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

Function signed_angle

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

Source from the content-addressed store, hash-verified

20double angle(P(a), P(b), P(c)) {
21 return acos(dot(b - a, c - b) / abs(b - a) / abs(c - b)); }
22double signed_angle(P(a), P(b), P(c)) {
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)) {

Callers

nothing calls this directly

Calls 1

crossFunction · 0.85

Tested by

no test coverage detected