diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2014-12-16 10:35:19 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:34:58 +0300 |
commit | 28c8f64c689ccf34f67f41bccda2878bce374b96 (patch) | |
tree | 90dee19d70a8e45438a3e6e14c4a2dc250086044 /geometry/geometry_tests | |
parent | 7d37e2c812a5fe288cdb91f69711beb5ed4a8c35 (diff) |
Taking into account all outgoing edges for a turn generation.
Diffstat (limited to 'geometry/geometry_tests')
-rw-r--r-- | geometry/geometry_tests/angle_test.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/geometry/geometry_tests/angle_test.cpp b/geometry/geometry_tests/angle_test.cpp index b77f30e351..4e5e0f912c 100644 --- a/geometry/geometry_tests/angle_test.cpp +++ b/geometry/geometry_tests/angle_test.cpp @@ -73,3 +73,10 @@ UNIT_TEST(ShortestDistance) TEST_ALMOST_EQUAL(ang::GetShortestDistance(math::pi - 1, 0), -math::pi + 1, ()); TEST_ALMOST_EQUAL(ang::GetShortestDistance(math::pi + 1, 0), math::pi - 1, ()); } + +UNIT_TEST(TwoVectorsAngle){ + TEST_ALMOST_EQUAL(ang::TwoVectorsAngle(m2::Point<double>({0, 0}), + m2::Point<double>({0, 1}), m2::Point<double>(1, 0)), 3 * math::pi2, ()); + TEST_ALMOST_EQUAL(ang::TwoVectorsAngle(m2::Point<double>({1, 1}), + m2::Point<double>({2, 2}), m2::Point<double>(1, 2)), math::pi4, ()); +} |