Function rc_quaternion_rotate_vector#
Defined in File quaternion.h
Function Documentation#
-
int rc_quaternion_rotate_vector(rc_vector_t *v, rc_vector_t q)#
Rotate a 3D vector v in-place about the origin by quaternion q by converting v to a quaternion and performing the operation p’=qpq*.
v is modified in place, q is unmodified.
- Parameters:
v – vectpr to be rotated
q – [in] rotation quarternion
- Returns:
Returns 0 on success or -1 on failure.