From 1f1ffe4470695c64c1317eaa8c35d7dd3fdd349b Mon Sep 17 00:00:00 2001 From: EDiasAlberto Date: Tue, 15 Oct 2024 15:15:16 +0100 Subject: [PATCH] add brackets to fixed-point conversion_const calculation for clarity --- src/threads/fixed-point.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/threads/fixed-point.h b/src/threads/fixed-point.h index 0270b55..c6872cf 100644 --- a/src/threads/fixed-point.h +++ b/src/threads/fixed-point.h @@ -4,7 +4,7 @@ /* Fixed Point Arithmetic bit count constants */ #define NUM_INT_BITS 11 #define NUM_FRAC_BITS 20 -#define CONVERSION_CONST 1 << NUM_FRAC_BITS /* f = 2^q, (2^20) */ +#define CONVERSION_CONST (1 << NUM_FRAC_BITS) /* f = 2^q, (2^20) */ /* Fixed Point Arithmetic conversion operations */ #define INT_TO_FP(n) ((n) * (CONVERSION_CONST))