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

Function TestPointDDir

libs/geometry/geometry_tests/spline_test.cpp:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void TestPointDDir(PointD const & dst, PointD const & src)
29{
30 double const len1 = dst.Length();
31 double const len2 = src.Length();
32 if (len1 < kAlmostZero || len2 < kAlmostZero)
33 {
34 TestEqual(dst.x, src.x);
35 TestEqual(dst.y, src.y);
36 }
37 else
38 {
39 TestEqual(dst.x / len1, src.x / len2);
40 TestEqual(dst.y / len1, src.y / len2);
41 }
42}
43
44} // namespace
45

Callers 1

UNIT_TESTFunction · 0.85

Calls 2

TestEqualFunction · 0.70
LengthMethod · 0.45

Tested by

no test coverage detected