MCPcopy Create free account
hub / github.com/PCGen/pcgen / doublesEqual

Method doublesEqual

code/src/java/pcgen/core/utils/CoreUtility.java:177–181  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 15

getFeatPointsTokenMethod · 0.95
getFaceTokenMethod · 0.95
getShortTokenMethod · 0.95
equalValuesMethod · 0.95
getSquaresTokenMethod · 0.95
passesMethod · 0.95
isFreeClothingMethod · 0.95
parseSpellStringMethod · 0.95
getSizeBonusToMethod · 0.95
processBrokenParserMethod · 0.95
calcBonusesWithCostMethod · 0.95
getWeightAsDoubleMethod · 0.95

Calls 1

compareDoubleMethod · 0.95

Tested by 1

passesMethod · 0.76