| 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 { |