diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-27 20:15:28 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-27 20:22:35 +0000 |
commit | b0b2d52a2f25d623be2498e31df9939286383722 (patch) | |
tree | a7d8c08601983976864bfeea87c6a4193a28f987 /test | |
parent | find_arc_centre given vectors (diff) | |
download | ilt-b0b2d52a2f25d623be2498e31df9939286383722.tar.bz2 ilt-b0b2d52a2f25d623be2498e31df9939286383722.tar.xz ilt-b0b2d52a2f25d623be2498e31df9939286383722.zip |
Calculate the radius to join to point+direction vector pairs
This uses a mental formula that was derived using symbolabs.com, it works but there just has
to be simpler form of it!
Diffstat (limited to 'test')
-rw-r--r-- | test/test-maths.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test-maths.cpp b/test/test-maths.cpp index d5848c6..6151c39 100644 --- a/test/test-maths.cpp +++ b/test/test-maths.cpp @@ -2,7 +2,6 @@ #include <boost/test/data/test_case.hpp> #include <boost/test/unit_test.hpp> -#include <iomanip> #include <stream_support.hpp> #include <glm/glm.hpp> @@ -92,3 +91,8 @@ BOOST_DATA_TEST_CASE(test_find_arc_centre, BOOST_CHECK_CLOSE(exp.y, c.first.y, 1); BOOST_CHECK_EQUAL(lr, c.second); } + +BOOST_AUTO_TEST_CASE(test_find_arcs_radius) +{ + BOOST_CHECK_CLOSE(find_arcs_radius({10.32, 26.71}, {0.4, .92}, {2.92, 22.41}, {-0.89, -0.45}), 2.29, 1); +} |