Use fixed point macros for math util
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user