| Vector4FClampToZero Method (Vector4F, Single) |
Returns a vector with near-zero vector components 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 Vector4F ClampToZero(
Vector4F vector,
float epsilon
)
Public Shared Function ClampToZero (
vector As Vector4F,
epsilon As Single
) As Vector4F
public:
static Vector4F ClampToZero(
Vector4F vector,
float epsilon
)
static member ClampToZero :
vector : Vector4F *
epsilon : float32 -> Vector4F
Parameters
- vector
- Type: DigitalRune.Mathematics.AlgebraVector4F
The vector. - epsilon
- Type: SystemSingle
The tolerance value.
Return Value
Type:
Vector4FThe vector with small components clamped to zero.
Remarks
Each vector component (X, Y, Z and W) is compared to zero. If the component is in the
interval [-epsilon, +epsilon] it is set to zero,
otherwise it remains unchanged.
See Also