XMQuaternionLength

Computes the magnitude of a quaternion.

Syntax

XMVECTOR XMQuaternionLength(
         XMVECTOR Q
)  

Parameters

Q
Type: XMVECTOR 

Quaternion to measure.

Return value

Type: XMVECTOR 

Returns a vector. The magnitude of Q is replicated into each component.

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.