Click or drag to resize
DigitalRuneVectorFClamp Method (VectorF, Single, Single)
Returns a vector with the vector elements clamped to the range [min, max].

Namespace: DigitalRune.Mathematics.Algebra
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public static VectorF Clamp(
	VectorF vector,
	float min,
	float max
)

Parameters

vector
Type: DigitalRune.Mathematics.AlgebraVectorF
The vector.
min
Type: SystemSingle
The min limit.
max
Type: SystemSingle
The max limit.

Return Value

Type: VectorF
A vector with clamped elements.
Remarks
This operation is carried out per element. Element values less than min are set to min. Element values greater than max are set to max.
See Also