| NumericClampToZero Method (Single, Single) |
Clamps near-zero values to zero.
Namespace: DigitalRune.MathematicsAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax public static float ClampToZero(
float value,
float epsilon
)
Public Shared Function ClampToZero (
value As Single,
epsilon As Single
) As Single
public:
static float ClampToZero(
float value,
float epsilon
)
static member ClampToZero :
value : float32 *
epsilon : float32 -> float32
Parameters
- value
- Type: SystemSingle
The value. - epsilon
- Type: SystemSingle
The tolerance value.
Return Value
Type:
Single
0 if the value is nearly zero (within the tolerance
epsilon) or the
original value otherwise.
See Also