Function mu::tiny::test::approx_equal(double, double, double)¶
Defined in File Shell.hpp
Function Documentation¶
-
bool mu::tiny::test::approx_equal(double d1, double d2, double threshold)¶
Returns true if
d1andd2differ by at mostthreshold.Used by the CHECK_APPROX macro. Handles NaN and infinity correctly.
- Parameters:
d1 – First value.
d2 – Second value.
threshold – Maximum allowed absolute difference (must be >= 0).
- Returns:
true if |d1 - d2| <= threshold.