assertables/assert_approx/mod.rs
1//! Assert for approximations.
2//!
3//! These macros compare numbers, such as two floating point numbers,
4//! where one number may be very close to another number but not quite equal.
5//!
6//! * [`assert_approx_eq!(a, b)`](macro@crate::assert_approx_eq) ≈ a is approximately equal to b
7//!
8//! * [`assert_approx_ne!(a, b)`](macro@crate::assert_approx_ne) ≈ a is approximately not equal to b
9//!
10//! # Example
11//!
12//! ```rust
13//! use assertables::*;
14//!
15//! let a: f32 = 1.0000001;
16//! let b: f32 = 1.0000011;
17//! assert_approx_eq!(a, b);
18//! ```
19
20pub mod assert_approx_eq;
21pub mod assert_approx_ne;