Function utils::approxEqual
Defined in File MiscUtils.hpp
Function Documentation
-
inline auto utils::approxEqual(double a, double b, double tol = 1e-6) -> bool
Compare two floating-point numbers for approximate equality.
- Parameters:
a – The first number to compare.
b – The second number to compare.
tol – The tolerance for comparison (default is 1e-6).
- Returns:
True if the numbers are approximately equal within the specified tolerance, false otherwise.