1 /* vector2.h */
2 #ifndef _VECTOR2_H_
3 #define _VECTOR2_H_
4 typedef struct vector2{
5 double x;
6 double y;
7 } vector2;
8
9 vector2 makevector2(double x, double y);
10 vector2 vec2plus(vector2 a, vector2 b);
11 void vec2add(vector2* a, vector2* b);
12 vector2 vec2minus(vector2 a, vector2 b);
13 void vec2subtract(vector2* a, vector2* b);
14 double vec2dot(vector2 a, vector2 b);
15
16 #endif
17