1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Assert for comparing floating-point 32-bit numbers within 2.0 * EPSILON.
//!
//! These macros are available:
//!
//! * [`assert_f32_eq!(a, b)`](macro@crate::assert_f32_eq) ≈ a = b (within 2ε)
//! * [`assert_f32_ne!(a, b)`](macro@crate::assert_f32_ne) ≈ a ≠ b (within 2ε)
//!
//! # Example
//!
//! ```rust
//! use assertables::*;
//!
//! let a: f32 = 1.0 / 3.0;
//! let b: f32 = 0.3333333;
//! assert_f32_eq!(a, b);
//!
//! let a: f32 = 1.0 / 3.0;
//! let b: f32 = 0.3333336;
//! assert_f32_ne!(a, b);
//! ```
pub const EQ: f32 = 1.0 / 3.0;
pub const EQ_LT: f32 = 0.3333333;
pub const EQ_GT: f32 = 0.3333334;
pub const LT: f32 = 0.3333331;
pub const GT: f32 = 0.3333336;