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

Function check_eps_boundaries

libs/geometry/geometry_tests/intersect_test.cpp:101–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void check_eps_boundaries(m2::RectD const & r, double eps = 1.0E-6)
102{
103 m2::RectD rr = r;
104 rr.Inflate(eps, eps);
105
106 for (int i = 0; i < 4; ++i)
107 {
108 m2::PointD p1 = get_point(rr, i);
109 m2::PointD p2 = get_point(rr, i + 1);
110
111 TEST(!m2::Intersect(r, p1, p2), ());
112 }
113
114 rr = r;
115 rr.Inflate(-eps, -eps);
116
117 for (int i = 0; i < 4; ++i)
118 check_inside(r, get_point(rr, i), get_point(rr, i + 1));
119}
120
121UNIT_TEST(IntersectRect_Section)
122{

Callers 1

UNIT_TESTFunction · 0.85

Calls 5

get_pointFunction · 0.85
TESTFunction · 0.85
check_insideFunction · 0.85
IntersectFunction · 0.70
InflateMethod · 0.45

Tested by

no test coverage detected