Function Utils::isEqualRel

Function Documentation

bool Utils::isEqualRel(const double a, const double b, const double percent = (1 - 1e-4))

Checks if two numbers are equal in relative tolerance.

  • a – The first number

  • b – The second number

  • percent – Percent of similarity (e.g., 1 and 0.99 are similar at least at 0.99)


True if the two numbers are equal up to the given tolerance