summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-05-20 15:23:21 -0400
committerhuderlem <huderlem@gmail.com>2020-05-24 08:28:02 -0500
commitf9e6f7540fed38b3ee36db7aad01d65831ca6dd9 (patch)
tree54dd6c2cee93726a0d3d1b9554aec26233b5fe65 /include/global.h
parentc6205b3df45273af953ec7318834b558a30ed930 (diff)
Use fixed point macros for math util
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h
index bcf3e6486..2b03ebbe1 100644
--- a/include/global.h
+++ b/include/global.h
@@ -52,7 +52,7 @@
#define Q_4_12(n) ((s16)((n) * 4096))
// Converts a number to Q24.8 fixed-point format
-#define Q_24_8(n) ((s32)((n) * 256))
+#define Q_24_8(n) ((s32)((n) << 8))
// Converts a Q8.8 fixed-point format number to a regular integer
#define Q_8_8_TO_INT(n) ((int)((n) / 256))