[−][src]Macro chek::almost_zero_with_tolerance
Panics if the provided value is not almost equal to zero.
Uses the almost
crate. See the
almost::zero_with_tolerance
documentation for more details.
A debug-only version is available as chek::debug_almost_zero_with_tolerance!
.
Optionally may take an additional message to display on failure, which is formatted using standard format syntax.
Example
chek::almost_zero_with_tolerance!(0.00000001, 0.01); chek::almost_zero_with_tolerance!(std::f32::EPSILON, std::f32::EPSILON * 2.0, "Should be almost zero!");