MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / ccw

Function ccw

contents/graham_scan/code/c/graham.c:24–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24double ccw(struct point a, struct point b, struct point c) {
25 return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
26}
27
28double polar_angle(struct point origin, struct point p) {
29 return atan2(p.y - origin.y, p.x - origin.x);

Callers 1

graham_scanFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected