Template Function mu::tiny::test::approx_equal(T, T, T)¶
Defined in File Shell.hpp
Function Documentation¶
-
template<typename T>
bool mu::tiny::test::approx_equal(T d1, T d2, T threshold)¶ approx_equal for non-double arithmetic types.
For floating-point
T, NaN in any operand returns false. Infinity and signed-overflow edge cases are not handled specially; if you need them, convert todoubleand call thedoubleoverload.For integral
Tthe comparison is done entirely in integer arithmetic — no conversion to floating-point occurs.