Computes the per-component angle modulo 2PI.
XMVECTOR XMVectorModAngles(
XMVECTOR Angles
)
Angles
Type: XMVECTOR
Vector of angle components.
Type: XMVECTOR
Returns a vector whose components are the corresponding components of Angles modulo 2PI.
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;
Header: Declared in directxmath.h.