MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / ccw

Function ccw

code/geometry/primitives.cpp:17–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15point normalize(P(p), double k = 1.0) {
16 return abs(p) == 0 ? point(0,0) : p / abs(p) * k; }
17double ccw(P(a), P(b), P(c)) { return cross(b - a, c - b); }
18bool collinear(P(a), P(b), P(c)) {
19 return abs(ccw(a, b, c)) < EPS; }
20double angle(P(a), P(b), P(c)) {

Callers 6

cut_polygonFunction · 0.85
convex_hullFunction · 0.85
checkFunction · 0.85
collinearFunction · 0.85
collinearFunction · 0.85
line_segment_distanceFunction · 0.85

Calls 1

crossFunction · 0.85

Tested by 1

checkFunction · 0.68