17 lines
299 B
C
17 lines
299 B
C
#ifndef VEC2_H
|
|
#define VEC2_H
|
|
|
|
typedef struct vec2_t {
|
|
float x, y;
|
|
} vec2;
|
|
|
|
vec2 vec2_add(vec2 a, vec2 b);
|
|
vec2 vec2_sub(vec2 a, vec2 b);
|
|
float vec2_dot(vec2 a, vec2 b);
|
|
vec2 vec2_mul(vec2 x, float f);
|
|
vec2 vec2_div(vec2 x, float f);
|
|
float vec2_mag(vec2 x);
|
|
vec2 vec2_normalize(vec2 x);
|
|
|
|
#endif
|