peroxide::util::useful

Function nearly_eq

Source
pub fn nearly_eq<S, T>(x: S, y: T) -> bool
where S: Into<f64>, T: Into<f64>,
Expand description

Near equal

ยงExamples

extern crate peroxide;
use peroxide::fuga::*;

assert!(nearly_eq(1.0/3.0 * 3.0, 1));