floatsEqual function

bool floatsEqual(
  1. double f1,
  2. double f2
)

Implementation

bool floatsEqual(double f1, double f2) {
  if (isDoubleNan(f1) || isDoubleNan(f2)) {
    return isDoubleNan(f1) && isDoubleNan(f2);
  }
  return (f2 - f1).abs() < epsilon;
}