forked from kdx/jtmm2-old
17 lines
264 B
C
17 lines
264 B
C
#ifndef _DEF_VEC
|
|
#define _DEF_VEC
|
|
|
|
typedef struct Vec
|
|
{
|
|
float x;
|
|
float y;
|
|
} Vec;
|
|
|
|
/* apply a force on a vector */
|
|
void vec_add(Vec *vector, Vec force);
|
|
|
|
/* apply the opposite of a force on a vector */
|
|
void vec_sub(Vec *vector, Vec force);
|
|
|
|
#endif /* _DEF_VEC */
|