rewrite fixed-point.h to not have magic numbers

This commit is contained in:
EDiasAlberto
2024-10-15 15:04:26 +01:00
parent 4f6849c4a4
commit 4e271ea5ab

View File

@@ -4,6 +4,6 @@
/* Fixed Point Arithmetic bit count constants */ /* Fixed Point Arithmetic bit count constants */
#define NUM_INT_BITS 11 #define NUM_INT_BITS 11
#define NUM_FRAC_BITS 20 #define NUM_FRAC_BITS 20
#define CONVERSION_CONST 1048576 /* f = 2^q, (2^20) */ #define CONVERSION_CONST 1 << NUM_FRAC_BITS /* f = 2^q, (2^20) */
#endif //FIXED_POINT_H #endif //FIXED_POINT_H