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

Function orientation

Geometry/Half Plane Intersection Dynamic.cpp:37–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35inline double dist(PT a, PT b) { return sqrt(dot(a - b, a - b)); }
36inline double cross(PT a, PT b) { return a.x * b.y - a.y * b.x; }
37inline int orientation(PT a, PT b, PT c) { return sign(cross(b - a, c - a)); }
38PT perp(PT a) { return PT(-a.y, a.x); }
39PT rotateccw90(PT a) { return PT(-a.y, a.x); }
40PT rotatecw90(PT a) { return PT(a.y, -a.x); }

Callers 1

cutMethod · 0.70

Calls 2

signFunction · 0.70
crossFunction · 0.70

Tested by

no test coverage detected