XMVector4ClampLengthV

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

Syntax

XMVECTOR XMVector4ClampLengthV(
         XMVECTOR V,
         XMVECTOR LengthMin,
         XMVECTOR LengthMax
)  

Parameters

V
Type: XMVECTOR 

4D vector to clamp.

LengthMin
Type: XMVECTOR 

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

LengthMax
Type: XMVECTOR 

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

Type: XMVECTOR 

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.

Requirements

Header: Declared in directxmath.h.