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

Function ccw

contents/graham_scan/code/cpp/graham_scan.cpp:18–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18double ccw(const point& a, const point& b, const point& c) {
19 return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
20}
21
22double polar_angle(const point& origin, const point& p) {
23 return std::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