Separate stick functionality from main file

This commit is contained in:
2022-11-16 01:42:47 +11:00
parent 160defe951
commit 1479433500
7 changed files with 297 additions and 287 deletions

View File

@ -12,7 +12,9 @@
#define SATURATE(X) (CLAMP(X, 0, 1))
typedef double vec_t;
typedef struct {vec_t x, y;} vector;
typedef struct { vec_t x, y; } vector;
typedef struct { int x, y, w, h; } rect;
static inline vector VecAdd(vector l, vector r)
{
@ -29,9 +31,4 @@ static inline double pfmod(double x, double d)
return fmod(fmod(x, d) + d, (d));
}
static inline double AccelCurve(double x, double y)
{
return (x * (x + y)) / (1.0 + y);
}
#endif//MATHS_H