[−][src]Function fuzzycomp::eq
pub fn eq<T>(lh: T, rh: T, margin: T) -> bool where
T: PartialOrd + Add<Output = T> + Sub<Output = T> + Copy,
Equal within margin (equal enough)
Compares two f64 with a given margin. Returns true if they are equal enough.
if(fuzzycomp::eq(std::f64::consts::PI, 3.0, 0.2)) { println!("Precision engineering!"); }