macro_rules! debug_assert_eq_float { ($left:expr, $right:expr $(,)?) => { ... }; ($left:expr, $right:expr; $($arg:tt)+) => { ... }; ($left:expr, $right:expr, $error:expr $(,)?) => { ... }; ($left:expr, $right:expr, $error:expr; $($arg:tt)+) => { ... }; }
Expand description
Asserts that two float expressions are (approximately) equal to each other.
Unlike assert_eq_float!
, debug_assert_eq_float!
statements are only enabled in non
optimized builds by default. An optimized build will not execute
debug_assert_eq_float!
statements unless -C debug-assertions
is passed to the
compiler. This makes debug_assert_eq_float!
useful for checks that are too
expensive to be present in a release build but may be helpful during
development. The result of expanding debug_assert_eq_float!
is always type checked.