diff options
author | Flenk008 <frenk_0_0@hotmail.com> | 2023-03-09 20:35:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 20:35:34 +0100 |
commit | c9d9e6927fd514667aae0e985ada42a736411450 (patch) | |
tree | 3bf1b69f4be518a7b5b4810c09053d95bc5399a8 /src/stm32/TODO/maths.h | |
parent | 569558ea9502b5e07ac4825ca94cadef0e65f0cf (diff) | |
parent | c63bbb2483eef7d07079f950096463abc01ce16f (diff) |
Merge pull request #3 from lonkaars/game-engine
Game engine
Diffstat (limited to 'src/stm32/TODO/maths.h')
-rw-r--r-- | src/stm32/TODO/maths.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/stm32/TODO/maths.h b/src/stm32/TODO/maths.h new file mode 100644 index 0000000..7b68156 --- /dev/null +++ b/src/stm32/TODO/maths.h @@ -0,0 +1,11 @@ +#include <math.h> + +typedef struct vec2{ + float x,y; +}; + +/// @brief clamps x between min and max +/// @param x value to clamp +/// @param min +/// @param max +float clamp( float& x, float &min, float &max ); |