XMQuaternionToAxisAngle

Computes an axis and angle of rotation about that axis for a given quaternion.

Syntax

void XMQuaternionToAxisAngle(
         XMVECTOR *pAxis,
         float *pAngle,
         XMVECTOR Q
)  

Parameters

pAxis
Type: XMVECTOR *

[out]

Address of a 3D vector describing the axis of rotation for the quaternion Q.

pAngle
Type: float *

[out]

Address of float describing the radian angle of rotation for the quaternion Q.

Q
Type: XMVECTOR 

[in]

Quaternion to measure.

Return value

None.

Remarks

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.

Requirements

Header: Declared in directxmath.h.