| VectorFClampToZero Method (VectorF, Single) |
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 VectorF ClampToZero(
VectorF vector,
float epsilon
)
Public Shared Function ClampToZero (
vector As VectorF,
epsilon As Single
) As VectorF
public:
static VectorF^ ClampToZero(
VectorF^ vector,
float epsilon
)
static member ClampToZero :
vector : VectorF *
epsilon : float32 -> VectorF
Parameters
- vector
- Type: DigitalRune.Mathematics.AlgebraVectorF
The vector. - epsilon
- Type: SystemSingle
The tolerance value.
Return Value
Type:
VectorFThe 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