mirror of
https://github.com/ENSL/NS.git
synced 2024-11-27 14:52:11 +00:00
7b18f64309
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@16 67975925-1194-0748-b3d5-c16f83f1a3a1
10 lines
No EOL
427 B
C
10 lines
No EOL
427 B
C
#ifndef VECOP_H
|
|
#define VECOP_H
|
|
|
|
#define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[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];}
|
|
#define VectorClear(a) { a[0]=0.0;a[1]=0.0;a[2]=0.0;}
|
|
|
|
#endif |