Class DoubleExtensions
Extensions for double.
public static class DoubleExtensions
- Inheritance
-
DoubleExtensions
- Inherited Members
Methods
IsEqualApprox(double, double, double)
Checks if the two values are approximately equal.
public static bool IsEqualApprox(this double a, double b, double precision = 0.001)
Parameters
Returns
- bool
True if the two values are approximately equal.
IsZeroApprox(double, double)
Checks if the value is approximately zero.
public static bool IsZeroApprox(this double value, double precision = 0.001)
Parameters
Returns
- bool
True if the value is approximately zero.
Trim(double, double)
Trims value to a given precision.
public static double Trim(this double value, double precision = 0.001)
Parameters
Returns
- double
Trimmed value.
Exceptions
- ArgumentOutOfRangeException
precision
is not positive and smaller than 1.