pub fn to_euler_angles<T>(q: Quaternion<T>) -> Vector3<T> where
    T: Float + FloatConst + FloatSimd<T>, 
Expand description

Convert versor, representing a vector rotation (q v q*), to z-y-x system Euler angles [rad].

In the gimbal locked state (pitch=±π/2 [rad]), roll=0 [rad].

Angle/Axis sequences is [yaw, pitch, roll] / [z, y, x]. pitch angle is limited to [-π/2, π/2].yaw and roll angle range is [-π, π].

To convert a Versor representing a frame rotation (q* v q), do the following:

let euler_angles = to_euler_angles( conj(q) );

return: [yaw, pitch, roll]