aboutsummaryrefslogtreecommitdiff
path: root/src/stm32/TODO/maths.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm32/TODO/maths.h')
-rw-r--r--src/stm32/TODO/maths.h11
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 );