Crate close_to

Source

Traits§

AssertCloseTo
A trace that guarantees that two decimals are equal to a specified precision. Implemented in float type by default.
CloseTo
Trait to determine if two decimals are equal to a specified precision. Implemented in float type by default.

Functions§

assert_be_close
Alias for assert_close_to for compatibility with assert-be-close.
assert_close_to
Ensures that two decimals are equal with the specified precision. In case of panic, the function outputs the value of the decimal along with a debug expression.
assert_far_from
Ensures that two decimals are not equal with the specified precision. In case of panic, the function outputs the value of the decimal along with a debugging expression.
assert_not_close
Alias for assert_not_close for compatibility with assert-not-close.
close_to
Determine if two decimals are equal with the specified precision.
far_from
Determine if two decimals are not equal with the specified precision.