|value - want| <= tolerance. NaN is never near anything.
assert_that(0.1 + 0.2, near(0.3, 0.0001));- want: the value to be close to.
- tolerance: the largest allowed difference.
near :: (want: float64, tolerance: float64) -> Matcher
|value - want| <= tolerance. NaN is never near anything.
Parameters
- want: float64
- the value to be close to.
- tolerance: float64
- the largest allowed difference.
Returns
assert_that(0.1 + 0.2, near(0.3, 0.0001));