pub fn approx_equal<T, U>(a: T, b: U, epsilon: Option<f64>) -> boolExpand description
Check if two numeric values are approximately equal within a specified epsilon.
This function works with any floating point or integer type that can be converted to a float. For integer types, it converts them to f64 for comparison.
§Arguments
a- First value to compareb- Second value to compareepsilon- Tolerance for equality comparison (defaults to 1e-10 if not specified)
§Returns
bool- True if the values are approximately equal, false otherwise