Skip to main content

values_close

Function values_close 

Source
pub fn values_close(
    actual: Value,
    expected: Value,
    rtol: f64,
    atol: f64,
) -> bool
Expand description

Returns whether two values are equal within a tolerance. NaN equals NaN.

The parts of complex numbers are compared separately, relative to the larger part of the expected value.