public final class RoundingHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
ABSOLUTE_MARGIN_VALUE
The absolute margin value which is used to check if two values are almost equal to each other.
|
static double |
RELATIVE_MARGIN_VALUE
The relative margin value which is used to check if two values are almost equal to each other.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areValuesAlmostEqual(double d1,
double d2)
Checks if two values are almost equal by using an absolute margin value for small differences and a relative margin value
for bigger differences.
|
public static final double ABSOLUTE_MARGIN_VALUE
public static final double RELATIVE_MARGIN_VALUE
public static boolean areValuesAlmostEqual(double d1,
double d2)
d1 - the first valued2 - the second valuejava.lang.IllegalArgumentException - if d1 or d2 is equal to (+/-)Infinity or NaN