MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / check

Function check

Geometry/Geometry 2D.cpp:1068–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1066 }
1067};
1068int check(HP a, HP b, HP c) {
1069 return cross(a.b - a.a, b.intersection(c) - a.a) > -eps; //-eps to include polygons of zero area (straight lines, points)
1070}
1071// consider half-plane of counter-clockwise side of each line
1072// if lines are not bounded add infinity rectangle
1073// returns a convex polygon, a point can occur multiple times though

Callers 1

half_plane_intersectionFunction · 0.70

Calls 2

crossFunction · 0.70
intersectionMethod · 0.45

Tested by

no test coverage detected