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

Function TestSegmentsIntersect

libs/geometry/geometry_tests/segment2d_tests.cpp:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19bool TestSegmentsIntersect(PointD a, PointD b, PointD c, PointD d)
20{
21 bool const res = SegmentsIntersect(a, b, c, d);
22 TEST_EQUAL(res, SegmentsIntersect(a, b, d, c), (a, b, c, d));
23 TEST_EQUAL(res, SegmentsIntersect(b, a, c, d), (a, b, c, d));
24 TEST_EQUAL(res, SegmentsIntersect(b, a, d, c), (a, b, c, d));
25 TEST_EQUAL(res, SegmentsIntersect(c, d, a, b), (a, b, c, d));
26 TEST_EQUAL(res, SegmentsIntersect(c, d, b, a), (a, b, c, d));
27 TEST_EQUAL(res, SegmentsIntersect(d, c, a, b), (a, b, c, d));
28 TEST_EQUAL(res, SegmentsIntersect(d, c, b, a), (a, b, c, d));
29 return res;
30}
31
32UNIT_TEST(SegmentIntersection_Collinear)
33{

Callers 1

UNIT_TESTFunction · 0.85

Calls 1

SegmentsIntersectFunction · 0.85

Tested by

no test coverage detected