6 releases
0.3.1 | Jun 21, 2020 |
---|---|
0.3.0 | Sep 9, 2019 |
0.2.2 | Sep 9, 2018 |
0.2.1 | Mar 23, 2018 |
0.1.0 | Oct 24, 2017 |
#1852 in Rust patterns
Used in chfft
41KB
774 lines
rust-appro-eq
Implementing the ApproEq
traits, Can asserts that the two expressions are approximately equal to each other.
How-to Use
See the crate documentation for more details.
Examples
assert_appro_eq!(1f64, 1.5f64, 0.6f64); // does not panic
assert_appro_eq!(0f64, 1e-12f64); // does not panic
assert_appro_eq!(1f64, 2f64); // panics
Optional Features
-
complex
- ImplementApproEq
traits fornum_complex::Complex
. This adds a dependency on thenum-complex
crate. -
rational
- ImplementApproEq
traits fornum_rational::Ratio
. This adds a dependency on thenum-rational
crate. -
ndarray
- ImplementApproEq
traits forndarray::ArrayBase
. This adds a dependency on thendarray
crate.
Dependencies
~0–385KB