[][src]Function directx_math::XMVector4ClampLengthV

pub fn XMVector4ClampLengthV(
    V: FXMVECTOR,
    LengthMin: FXMVECTOR,
    LengthMax: FXMVECTOR
) -> XMVECTOR

Clamps the length of a 4D vector to a given range.

Parameters

V 4D vector to clamp.

LengthMin 4D vector, all of whose components are equal to the minimum clamp length. The components must be greater-than-or-equal to zero.

LengthMax 4D vector, all of whose components are equal to the maximum clamp length. The components must be greater-than-or-equal to zero.

Return value

Returns a 4D vector whose length is clamped to the specified minimum and maximum.

Remarks

This function is identical to XMVector4ClampLength except that LengthMin and LengthMax are supplied using 4D vectors instead of float values.

Reference

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