yup, I'm an honourary vacuum cleaner.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3447 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
815c33a8cc
commit
1d136eab27
1 changed files with 3 additions and 1 deletions
|
@ -61,6 +61,8 @@ extern vec3_t vec3_origin;
|
|||
#define nanmask (255<<23)
|
||||
#define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask)
|
||||
|
||||
#define FloatInterpolate(a, bness, b, c) (c) = (a)*(1-bness) + (b)*bness
|
||||
|
||||
#define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2])
|
||||
#define VectorSubtract(a,b,c) do{(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];}while(0)
|
||||
#define VectorAdd(a,b,c) do{(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];}while(0)
|
||||
|
@ -73,7 +75,7 @@ extern vec3_t vec3_origin;
|
|||
#define VectorMA(a,s,b,c) do{(c)[0] = (a)[0] + (s)*(b)[0];(c)[1] = (a)[1] + (s)*(b)[1];(c)[2] = (a)[2] + (s)*(b)[2];}while(0)
|
||||
#define VectorEquals(a,b) ((a)[0] == (b)[0] && (a)[1] == (b)[1] && (a)[2] == (b)[2])
|
||||
#define VectorAvg(a,b,c) ((c)[0]=((a)[0]+(b)[0])*0.5f,(c)[1]=((a)[1]+(b)[1])*0.5f, (c)[2]=((a)[2]+(b)[2])*0.5f)
|
||||
|
||||
#define VectorInterpolate(a, bness, b, c) FloatInterpolate((a)[0], bness, (b)[0], (c)[0]),FloatInterpolate((a)[1], bness, (b)[1], (c)[1]),FloatInterpolate((a)[2], bness, (b)[2], (c)[2])
|
||||
#define Vector2Copy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];}
|
||||
#define Vector2Set(r,x,y) {(r)[0] = x; (r)[1] = y;}
|
||||
|
||||
|
|
Loading…
Reference in a new issue