From df8c280d7e6f2f3acfa4c8f50974b63e727a7157 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Fri, 5 May 2017 15:45:05 +0200 Subject: [PATCH] More documentation --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 07e3e45..da99861 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -125,6 +125,10 @@ impl core::iter::FromIterator 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 {