jtmm2/include/vec.h

17 lines
253 B
C

#ifndef _DEF_VEC2D
#define _DEF_VEC2D
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