| Vector3DClampToZero Method (Vector3D, Double) |
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 Vector3D ClampToZero(
Vector3D vector,
double epsilon
)
Public Shared Function ClampToZero (
vector As Vector3D,
epsilon As Double
) As Vector3D
public:
static Vector3D ClampToZero(
Vector3D vector,
double epsilon
)
static member ClampToZero :
vector : Vector3D *
epsilon : float -> Vector3D
Parameters
- vector
- Type: DigitalRune.Mathematics.AlgebraVector3D
The vector. - epsilon
- Type: SystemDouble
The tolerance value.
Return Value
Type:
Vector3DThe vector with small components clamped to zero.
Remarks
Each vector component (X, Y and Z) is compared to zero. If the component is in the interval
[-epsilon, +epsilon] it is set to zero, otherwise it
remains unchanged.
See Also