aboutsummaryrefslogtreecommitdiff
path: root/src/engine/maths.c
diff options
context:
space:
mode:
authorUnavailableDev <ggwildplay@gmail.com>2023-03-13 09:57:34 +0100
committerUnavailableDev <ggwildplay@gmail.com>2023-03-13 09:57:34 +0100
commit5c4bf7d451135cd3af3e51976251f01cbb6e6573 (patch)
tree82990aa7c7df22c0888543a87dbd05799217cc99 /src/engine/maths.c
parentbb2839a81d64e8644c57d83806ae41cc4cfad9dd (diff)
camera, movement, collisions
Diffstat (limited to 'src/engine/maths.c')
-rw-r--r--src/engine/maths.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/maths.c b/src/engine/maths.c
index ebd699c..475bba2 100644
--- a/src/engine/maths.c
+++ b/src/engine/maths.c
@@ -1,5 +1,9 @@
#include "engine/maths.h"
+vec2 vec_add(vec2 a, vec2 b){
+ return (vec2){a.x + b.x, a.y + b.y};
+}
+
vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){
return (vec_cor){
.x = in.x - halfDistance.x,