summaryrefslogtreecommitdiff
path: root/include/math_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/math_util.h')
-rw-r--r--include/math_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/math_util.h b/include/math_util.h
index a54eaf3618..6b60d4a1d6 100644
--- a/include/math_util.h
+++ b/include/math_util.h
@@ -22,6 +22,9 @@ typedef float fp_inter_t;
/* Fixed-point to float, for unit tests */
#define FP_TO_FLOAT(x) ((float)(x))
+#define FLT_MAX (3.4028234664e+38)
+#define FLT_MIN (1.1754943508e-38)
+
#else
/* Fixed-point type */
typedef int32_t fp_t;
@@ -39,6 +42,10 @@ typedef int64_t fp_inter_t;
#define FLOAT_TO_FP(x) ((fp_t)((x) * (float)(1<<FP_BITS)))
/* Fixed-point to float, for unit tests */
#define FP_TO_FLOAT(x) ((float)(x) / (float)(1<<FP_BITS))
+
+#define FLT_MAX INT32_MAX
+#define FLT_MIN INT32_MIN
+
#endif
/*