summaryrefslogtreecommitdiffstats
path: root/src/storage_number.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage_number.h')
-rw-r--r--src/storage_number.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/storage_number.h b/src/storage_number.h
index 3c1b6bab3..616ff881e 100644
--- a/src/storage_number.h
+++ b/src/storage_number.h
@@ -17,6 +17,9 @@ typedef long double collected_number;
#define calculated_number_llrint(x) llrintl(x)
#define calculated_number_round(x) roundl(x)
#define calculated_number_fabs(x) fabsl(x)
+#define calculated_number_epsilon (calculated_number)0.0000001
+
+#define calculated_number_equal(a, b) (calculated_number_fabs((a) - (b)) < calculated_number_epsilon)
typedef uint32_t storage_number;
#define STORAGE_NUMBER_FORMAT "%u"