| VectorDClamp Method (VectorD, Double, Double) |
Returns a vector with the vector elements 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 VectorD Clamp(
VectorD vector,
double min,
double max
)
Public Shared Function Clamp (
vector As VectorD,
min As Double,
max As Double
) As VectorD
public:
static VectorD^ Clamp(
VectorD^ vector,
double min,
double max
)
static member Clamp :
vector : VectorD *
min : float *
max : float -> VectorD
Parameters
- vector
- Type: DigitalRune.Mathematics.AlgebraVectorD
The vector. - min
- Type: SystemDouble
The min limit. - max
- Type: SystemDouble
The max limit.
Return Value
Type:
VectorDA 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