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

Method rotatePoint

code/geometry/primitives3d.cpp:46–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 point3d rotate(double alpha, P(normal)) const {
45 return (*this) * cos(alpha) + rotate(normal) * sin(alpha);}
46 point3d rotatePoint(P(O), P(axe), double alpha) const{
47 point3d Z = axe.normalize(axe % (*this - O));
48 return O + Z + (*this - O - Z).rotate(alpha, O); }
49 bool isZero() const {
50 return abs(x) < EPS && abs(y) < EPS && abs(z) < EPS; }
51 bool isOnLine(L(A, B)) const {

Callers

nothing calls this directly

Calls 2

normalizeMethod · 0.80
rotateMethod · 0.45

Tested by

no test coverage detected