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

Function rotate

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

Source from the content-addressed store, hash-verified

6double dot(P(a), P(b)) { return real(conj(a) * b); }
7double cross(P(a), P(b)) { return imag(conj(a) * b); }
8point rotate(P(p), double radians = pi / 2,
9 P(about) = point(0,0)) {
10 return (p - about) * exp(point(0, radians)) + about; }
11point reflect(P(p), L(about1, about2)) {
12 point z = p - about1, w = about2 - about1;
13 return conj(z / w) * w + about1; }

Callers 7

intersectFunction · 0.85
tangentFunction · 0.85
tangent_outerFunction · 0.85
rotateMethod · 0.85
testFunction · 0.85
left_rotateMethod · 0.85
right_rotateMethod · 0.85

Calls 1

pointClass · 0.70

Tested by 1

testFunction · 0.68