add brackets to fixed-point conversion_const calculation for clarity
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
/* 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 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 */
|
/* Fixed Point Arithmetic conversion operations */
|
||||||
#define INT_TO_FP(n) ((n) * (CONVERSION_CONST))
|
#define INT_TO_FP(n) ((n) * (CONVERSION_CONST))
|
||||||
|
|||||||
Reference in New Issue
Block a user