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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/math_util.h b/include/math_util.h
index 6b60d4a1d6..266bde6743 100644
--- a/include/math_util.h
+++ b/include/math_util.h
@@ -48,6 +48,9 @@ typedef int64_t fp_inter_t;
#endif
+/* Some useful math functions. Use with integers only! */
+#define POW2(x) ((x) * (x))
+
/*
* Fixed-point addition and subtraction can be done directly, because they
* work identically.