diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-15 14:38:00 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-15 14:38:00 +0000 |
commit | 39985f36e807126b2c7b9ec6096bda3922903a54 (patch) | |
tree | 6f7f69bccb02ac49b722c8b0981b08e928ea2678 /test/test-geoData.cpp | |
parent | vector difference works with floating point (diff) | |
download | ilt-39985f36e807126b2c7b9ec6096bda3922903a54.tar.bz2 ilt-39985f36e807126b2c7b9ec6096bda3922903a54.tar.xz ilt-39985f36e807126b2c7b9ec6096bda3922903a54.zip |
2D triangle area support
Diffstat (limited to 'test/test-geoData.cpp')
-rw-r--r-- | test/test-geoData.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/test/test-geoData.cpp b/test/test-geoData.cpp index 5411b61..1ca050d 100644 --- a/test/test-geoData.cpp +++ b/test/test-geoData.cpp @@ -190,23 +190,6 @@ BOOST_DATA_TEST_CASE(walkTerrainUntil, BOOST_CHECK_EQUAL_COLLECTIONS(visited.begin(), visited.end(), visits.begin(), visits.end()); } -BOOST_AUTO_TEST_CASE(triangle_helpers) -{ - constexpr static GeoData::Triangle<3> t {{0, 0, 0}, {5, 0, 0}, {5, 5, 0}}; - - BOOST_CHECK_EQUAL(t.nnormal(), up); - BOOST_CHECK_CLOSE(t.angle(0), quarter_pi, 0.01F); - BOOST_CHECK_CLOSE(t.angleAt({0, 0, 0}), quarter_pi, 0.01F); - BOOST_CHECK_CLOSE(t.angle(1), half_pi, 0.01F); - BOOST_CHECK_CLOSE(t.angleAt({5, 0, 0}), half_pi, 0.01F); - BOOST_CHECK_CLOSE(t.angle(2), quarter_pi, 0.01F); - BOOST_CHECK_CLOSE(t.angleAt({5, 5, 0}), quarter_pi, 0.01F); - - BOOST_CHECK_CLOSE(t.angleAt({0, 1, 0}), 0.F, 0.01F); - - BOOST_CHECK_CLOSE(t.area(), 12.5F, 0.01F); -} - using FindEntiesData = std::tuple<GlobalPosition2D, GlobalPosition2D, int>; BOOST_DATA_TEST_CASE(findEntries, |