approx
approx copied to clipboard
assert_abs_diff_eq does not allow specifying epsilon
Why can't I specify custom epsilon with assert_abs_diff_eq but I can with abs_diff_eq
// not possible
assert_abs_diff_eq!(1.0, 1.0, epsilon = f64::EPSILON);
// possible
abs_diff_eq!(1.0, 1.0, epsilon = f64::EPSILON);
This makes me unable to write write Rust tests so that I can see the left and right values on test errors when setting epsilon is needed.
It is possible to specify a custom epsilon, I do it a lot in the tests of my lambert_w crate. Perhaps there's some mistake?