aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.h b/common.h
index 805ba0b..2e8b8bc 100644
--- a/common.h
+++ b/common.h
@@ -145,6 +145,12 @@ tolerant_eq(double a, double b)
return iszeroish((a - b) / 100.0);
}
+static inline int
+intolerant_eq(double a, double b)
+{
+ return fabs(a - b) < 1e-11;
+}
+
# define ASSERT(ASSERTION)\
do {\
if (!(ASSERTION)) {\