rotate
template <typename T>
Vector3T< T > rotate(const QuaternionT< T > &q, const Vector3T< T > &v) noexceptParameters
| Name | Type |
|---|---|
q | const QuaternionT< T > & |
v | const Vector3T< T > & |
Returns
Vector3T< T >
Description
Rotates v by unit quaternion q.
Uses the standard two-cross-product form (no matrix build): with qv = (q.x, q.y, q.z), v' = v + 2*w*(qv x v) + 2*(qv x (qv x v)).

