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

Method rotate

code/geometry/primitives3d.cpp:41–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 point3d v = B - A;
40 return A + v.normalize((v % (*this - A)) / v.length()); }
41 point3d rotate(P(normal)) const {
42 //normal must have length 1 and be orthogonal to the vector
43 return (*this) * normal; }
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{

Callers 1

rotatePointMethod · 0.45

Calls 1

rotateFunction · 0.85

Tested by

no test coverage detected