[−][src]Function directx_math::XMQuaternionRotationMatrix
pub fn XMQuaternionRotationMatrix(M: XMMATRIX) -> FXMVECTOR
Computes a rotation quaternion from a rotation matrix.
Parameters
M
Rotation matrix.
Return value
Returns the rotation quaternion.
Remarks
This function only uses the upper 3x3 portion of the XMMATRIX. Note if the input matrix contains scales, shears, or other non-rotation transformations in the upper 3x3 matrix, then the output of this function is ill-defined.
The DirectXMath quaternion functions use an XMVECTOR 4-vector to represent quaternions, where the X
,
Y
, and Z
components are the vector part and the W
component is the scalar part.