public class MathUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
DOUBLE_EQUALITY_TOLERANCE
A small value used to test 'equality' of values that are floating point
|
Constructor and Description |
---|
MathUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equalsWithTolerance(double first,
double second,
double tolerance)
Checks if two numbers are the same or close to the same
|
public static final double DOUBLE_EQUALITY_TOLERANCE
public static boolean equalsWithTolerance(double first, double second, double tolerance)
first
- The first numbersecond
- The second numbertolerance
- The amount different the numbers can be to be considered equal. This number should be positive