| Vector2FClamp Method (Vector2F, Single, Single) |
Returns a vector with the vector components clamped to the range [min, max].
Namespace: DigitalRune.Mathematics.AlgebraAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static Vector2F Clamp(
Vector2F vector,
float min,
float max
)
Public Shared Function Clamp (
vector As Vector2F,
min As Single,
max As Single
) As Vector2F
public:
static Vector2F Clamp(
Vector2F vector,
float min,
float max
)
static member Clamp :
vector : Vector2F *
min : float32 *
max : float32 -> Vector2F
Parameters
- vector
- Type: DigitalRune.Mathematics.AlgebraVector2F
The vector. - min
- Type: SystemSingle
The min limit. - max
- Type: SystemSingle
The max limit.
Return Value
Type:
Vector2FA vector with clamped components.
Remarks
This operation is carried out per component. Component values less than
min are set to min. Component values greater than
max are set to max.
See Also