rotated method
(en)Return rotated new vector.
(ja)このベクトルを回転した新しいベクトルを返します。
norAxis
: normalized rotate axis vector.radian
: radian = degree * pi / 180.
Implementation
Sp3dV3D rotated(Sp3dV3D norAxis, double radian) {
Sp3dV3D c = Sp3dV3D.proj(this, norAxis);
Sp3dV3D w = this - c;
return c + (w * cos(radian)) + (Sp3dV3D.cross(norAxis, w) * sin(radian));
}