More documentation

This commit is contained in:
Vinzent Steinberg 2017-05-05 15:45:05 +02:00
parent c740a60bf4
commit df8c280d7e
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ impl core::iter::FromIterator<f64> for Average {
}
}
/// Assert that two numbers are almost equal to each other.
///
/// On panic, this macro will print the values of the expressions with their
/// debug representations.
macro_rules! assert_almost_eq {
($a:expr, $b:expr, $prec:expr) => (
if ($a - $b).abs() > $prec {