aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-02-08 20:46:54 +0100
committerMattias Andrée <maandree@kth.se>2023-02-08 20:46:54 +0100
commit96fe8194386421855279c52a7061b8d21ba60767 (patch)
tree42b3cbbd6b5d1af446065be563f1243203eaf214 /common.h
parentm whitespace (diff)
downloadlibrifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-96fe8194386421855279c52a7061b8d21ba60767.tar.gz
librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-96fe8194386421855279c52a7061b8d21ba60767.tar.bz2
librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-96fe8194386421855279c52a7061b8d21ba60767.tar.xz
Test lines.c
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-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)) {\