fix bracketing issue in ROUNDING_FP_TO_INT

This commit is contained in:
EDiasAlberto
2024-10-15 17:23:03 +01:00
parent df89bda71e
commit 2834af032d

View File

@@ -12,7 +12,7 @@
/* Handles conversion of fixed point to integer. First version truncates, second one rounds */
#define FLOOR_FP_TO_INT(x) ((x) / (CONVERSION_CONST))
#define ROUNDING_FP_TO_INT(x) ((x) >= 0 ? ((x) + ((CONVERSION_CONST) / 2)) : ((x) - ((CONVERSION_CONST) / 2))
#define ROUNDING_FP_TO_INT(x) ((x) >= 0 ? ((x) + ((CONVERSION_CONST) / 2)) : ((x) - ((CONVERSION_CONST) / 2)))
/* Fixed Point Arithmetic addition operations */
#define FP_ADD(x, y) ((x) + (y))