EsbDecimals - a Free Subset of ESBPCS for .NET

CompareOps.ValueIsZero Method (Decimal, Decimal)

Returns true if Value is within a "small" value of 0.

[Visual Basic]
Overloads Public Shared Function ValueIsZero( _
   ByVal x As Decimal, _
   ByVal precision As Decimal _
) As Boolean
[C#]
public static bool ValueIsZero(
   decimal x,
   decimal precision
);

Parameters

x
Value to Compare.
precision
Precision to used for comparison, should be positive and small, see DecimalPrecisionDef.

Return Value

True if Value is very close to Zero.

Remarks

There is an overloaded version without the Precision that will use DecimalPrecisionDef for the Precision value.

See Also

CompareOps Class | Esb.Math Namespace | CompareOps.ValueIsZero Overload List