MCPcopy Create free account
hub / github.com/cp-algorithms/cp-algorithms / main

Function main

test/test_point_location.cpp:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34int main(){
35 DCEL p = from_polygon({pt(0, 0), pt(3, 0), pt(0, 3)});
36 auto res = point_location(p, {pt(1, 2), pt(2, 1), pt(1, 1), pt(2, 2), pt(0, 4), pt(-1, 0)});
37 assert(res[0] == make_pair(0, 2) || res[0] == make_pair(0, 3));
38 assert(res[1] == make_pair(0, 2) || res[1] == make_pair(0, 3));
39 assert(res[2] == make_pair(1, 0));
40 assert(res[3] == make_pair(1, -1));
41 assert(res[4] == make_pair(1, -1));
42 assert(res[5] == make_pair(1, -1));
43 return 0;
44}

Callers

nothing calls this directly

Calls 2

from_polygonFunction · 0.85
ptClass · 0.85

Tested by

no test coverage detected