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

Function perp

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

Source from the content-addressed store, hash-verified

23 return asin(cross(b - a, c - b) / abs(b - a) / abs(c - b)); }
24double angle(P(p)) { return atan2(imag(p), real(p)); }
25point perp(P(p)) { return point(-imag(p), real(p)); }
26double progress(P(p), L(a, b)) {
27 if (abs(real(a) - real(b)) < EPS)
28 return (imag(p) - imag(a)) / (imag(b) - imag(a));

Callers 1

circumcircleFunction · 0.85

Calls 1

pointClass · 0.70

Tested by

no test coverage detected