Clamps the length of a 3D vector to a given range.
XMVECTOR XMVector3ClampLengthV(
XMVECTOR V,
XMVECTOR LengthMin,
XMVECTOR LengthMax
)
V
Type: XMVECTOR
3D vector to clamp.
LengthMin
Type: XMVECTOR
3D vector whose x, y, and z-components are equal to the minimum clamp length. The x, y, and z-components must be greater-than-or-equal to zero.
LengthMax
Type: XMVECTOR
3D vector whose x, y, and z-components are equal to the minimum clamp length. The x, y, and z-components must be greater-than-or-equal to zero.
Type: XMVECTOR
Returns a 3D vector whose length is clamped to the specified minimum and maximum.
This function is identical to XMVector3ClampLength except that LengthMin and LengthMax are supplied using 3D vectors instead of float values.
Header: Declared in directxmath.h.