| VectorDClampToZero Method (VectorD, Double) |
Returns a vector with near-zero vector elements clamped to 0.
Namespace: DigitalRune.Mathematics.AlgebraAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static VectorD ClampToZero(
VectorD vector,
double epsilon
)
Public Shared Function ClampToZero (
vector As VectorD,
epsilon As Double
) As VectorD
public:
static VectorD^ ClampToZero(
VectorD^ vector,
double epsilon
)
static member ClampToZero :
vector : VectorD *
epsilon : float -> VectorD
Parameters
- vector
- Type: DigitalRune.Mathematics.AlgebraVectorD
The vector. - epsilon
- Type: SystemDouble
The tolerance value.
Return Value
Type:
VectorDThe vector with small elements clamped to zero.
Remarks
Each vector element is compared to zero. If the element is in the interval
[-epsilon, +epsilon] it is set to zero, otherwise it
remains unchanged.
See Also