Compare two doubles within an epsilon of 0.0001. @param a first operand @param b second operand @return TRUE if equal, else FALSE
(final double a, final double b)
| 175 | * @return TRUE if equal, else FALSE |
| 176 | */ |
| 177 | public static boolean doublesEqual(final double a, final double b) |
| 178 | { |
| 179 | // If the difference is less than epsilon, treat as equal. |
| 180 | return compareDouble(a, b, EPSILON); |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * protect the floor function from the vagaries of floating point precision. |