diff --git a/qw/include/mathlib.h b/qw/include/mathlib.h index bf91ab798..ce2042f46 100644 --- a/qw/include/mathlib.h +++ b/qw/include/mathlib.h @@ -43,7 +43,7 @@ extern int nanmask; #define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask) -#define DotProduct(a,b) ((a)[0]*(a)[0]+(a)[1]*(a)[1]+(a)[2]*(a)[2]) +#define DotProduct(a,b) ((a)[0]*(b)[0]+(a)[1]*(b)[1]+(a)[2]*(b)[2]) #define VectorSubtract(a,b,c) {(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];} #define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];} #define VectorCopy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];}