[][src]Function directx_math::XMVectorModAngles

pub fn XMVectorModAngles(Angles: FXMVECTOR) -> XMVECTOR

Computes the per-component angle modulo 2PI.

Parameters

Angles Vector of angle components.

Return value

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;

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMVectorModAngles