Function directx_math::XMVector4InBounds[][src]

pub fn XMVector4InBounds(V: FXMVECTOR, Bounds: FXMVECTOR) -> bool

Tests whether the components of a 4D vector are within set bounds.

Parameters

V 4D vector to test.

Bounds 4D vector that determines the bounds.

Return value

Returns true if all of the components of V are within the set bounds, and false otherwise.

Remarks

The following pseudocode demonstrates the operation of the function:

return (V.x <= Bounds.x && V.x >= -Bounds.x) &&
       (V.y <= Bounds.y && V.y >= -Bounds.y) &&
       (V.z <= Bounds.z && V.z >= -Bounds.z) &&
       (V.w <= Bounds.w && V.w >= -Bounds.w);

Reference

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