assert_f64_gt_as_result

Macro assert_f64_gt_as_result 

Source
macro_rules! assert_f64_gt_as_result {
    ($a:expr, $b:expr $(,)?) => { ... };
}
Expand description

Assert two floating point numbers are equal within f64::EPSILON.

Pseudocode:
a > b

  • If true, return Result Ok(()).

  • Otherwise, return Result Err(message).

This macro is useful for runtime checks, such as checking parameters, or sanitizing inputs, or handling different results in different ways.

ยงModule macros