Function assert_approx_eq

Source
pub fn assert_approx_eq(
    lhs: FLOAT,
    rhs: FLOAT,
    eps: FLOAT,
) -> Result<bool, Box<EvalAltResult>>
Expand description

Assert that two floats are approximately equal (within eps) and return an error if they are not.

assert_approx_eq(2.0, 2.000000000000000001, 1e-10);