MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/geometry/geometry_tests/angle_test.cpp:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using math::pi;
11
12UNIT_TEST(Atan)
13{
14 double const h4 = math::pi / 4.0;
15
16 TEST(is_equal_atan(1, 1, h4), ());
17 TEST(is_equal_atan(-1, 1, math::pi - h4), ());
18 TEST(is_equal_atan(-1, -1, h4 - math::pi), ());
19 TEST(is_equal_atan(1, -1, -h4), ());
20
21 double const hh = atan(1.0 / 2.0);
22
23 TEST(is_equal_atan(2, 1, hh), ());
24 TEST(is_equal_atan(-2, 1, math::pi - hh), ());
25 TEST(is_equal_atan(-2, -1, hh - math::pi), ());
26 TEST(is_equal_atan(2, -1, -hh), ());
27}
28
29UNIT_TEST(Atan2)
30{

Callers

nothing calls this directly

Calls 9

TESTFunction · 0.85
is_equal_atanFunction · 0.85
is_equal_angleFunction · 0.85
GetMiddleAngleFunction · 0.85
check_avgFunction · 0.85
GetShortestDistanceFunction · 0.85
TwoVectorsAngleFunction · 0.85
AzimuthFunction · 0.85
AlmostEqualAbsFunction · 0.50

Tested by

no test coverage detected