XMVectorModAngles

Computes the per-component angle modulo 2PI.

Syntax

XMVECTOR XMVectorModAngles(
         XMVECTOR Angles
)  

Parameters

Angles
Type: XMVECTOR 

Vector of angle components.

Return value

Type: XMVECTOR 

Returns a vector whose components are the corresponding components of Angles modulo 2PI.

Remarks

The following pseudocode demonstrates the operation of the function:

XMVECTOR result;

result.x = Angles.x - XM_2PI * round( Angles.x / XM_2PI );
result.y = Angles.y - XM_2PI * round( Angles.y / XM_2PI );
result.z = Angles.z - XM_2PI * round( Angles.z / XM_2PI );
result.w = Angles.w - XM_2PI * round( Angles.w / XM_2PI );

return result;  

Requirements

Header: Declared in directxmath.h.