mirror of
https://github.com/ENSL/NS.git
synced 2024-11-26 06:20:57 +00:00
4f13237895
Change CRLF to LF in repo.
10 lines
No EOL
418 B
C
10 lines
No EOL
418 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 |