XMVector2ClampLength

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

Syntax

XMVECTOR XMVector2ClampLength(
         XMVECTOR V,
         float LengthMin,
         float LengthMax
)  

Parameters

V
Type: XMVECTOR 

2D vector.

LengthMin
Type: float 

Minimum clamp length.

LengthMax
Type: float 

Maximum clamp length.

Return value

Type: XMVECTOR 

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

Requirements

Header: Declared in directxmath.h.