Use fixed point macros for math util

This commit is contained in:
GriffinR
2020-05-20 15:23:21 -04:00
committed by huderlem
parent c6205b3df4
commit f9e6f7540f
5 changed files with 41 additions and 41 deletions

View File

@@ -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))