Function Utils::isEqualRel
Defined in File utils.h
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.
- Parameters
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)
- Returns
True if the two numbers are equal up to the given tolerance