Crate flanker_assert_float

Source
Expand description

Assertions for floating-point numbers.

Functionsยง

assert_relative
Asserts that the quotient of the difference between the two floats over the largest (by magnitude) of the two floats, taken as an absolute value, is within the supplied delta threshold.
check_relative
Checks whether the quotient of the difference between the two floats over the largest (by magnitude) of the two floats, taken as an absolute value, is within the supplied delta threshold.