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

Function angle

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

Source from the content-addressed store, hash-verified

18bool collinear(P(a), P(b), P(c)) {
19 return abs(ccw(a, b, c)) < EPS; }
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)); }

Callers

nothing calls this directly

Calls 1

dotFunction · 0.85

Tested by

no test coverage detected