[−][src]Macro gramit::assert_approx_eq
Assert that two expressions are approximately equal according to their ApproxEq
implementations.
Passes additional parameters on to the standard library assert!
macro, so custom format
messages are accepted as per usual.
Example
use gramit::ApproxEq; assert_approx_eq!(1.0_f32, 1.0_f32); assert_approx_eq!(1.0, 1.0 + 0.5 * gramit::fp::EQ_THRESHOLD_F32, "{} and {} were not approximately equal; this shouldn't happen!", 1.0, 1.0 + 0.5 * gramit::fp::EQ_THRESHOLD_F32);