aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 1fbfa4c..bbe6b52 100644
--- a/src/common.h
+++ b/src/common.h
@@ -735,6 +735,7 @@ wait_vsync(void) {
735#define LEN(ARR) (sizeof(ARR) / sizeof((ARR)[0])) 735#define LEN(ARR) (sizeof(ARR) / sizeof((ARR)[0]))
736 736
737// Fixed-point arithmetic for (i.P) numbers. 737// Fixed-point arithmetic for (i.P) numbers.
738#define FP_NUM(A,P) ((A) << (P))
738#define FP_MUL(A,B,P) (((A) * (B)) >> (P)) 739#define FP_MUL(A,B,P) (((A) * (B)) >> (P))
739#define FP_DIV(A,B,P) (((A) << (P)) / (B)) 740#define FP_DIV(A,B,P) (((A) << (P)) / (B))
740#define FP_LERP(Y0,Y1,X,P) ((Y0) + FP_MUL((X), ((Y1) - (Y0)), P)) 741#define FP_LERP(Y0,Y1,X,P) ((Y0) + FP_MUL((X), ((Y1) - (Y0)), P))