summaryrefslogtreecommitdiff
path: root/src/math/vec2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/vec2.c')
-rw-r--r--src/math/vec2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/math/vec2.c b/src/math/vec2.c
index dc964e7..c807baf 100644
--- a/src/math/vec2.c
+++ b/src/math/vec2.c
@@ -16,6 +16,12 @@ void internal_vec2_plus(Vec2* v1, Vec2* v2, Vec2* out) {
out->y = v1->y + v2->y;
}
+void internal_vec2_minus(Vec2* v1, Vec2* v2, Vec2* out) {
+ ssr_assert(v1 && v2 && out);
+ out->x = v1->x - v2->x;
+ out->y = v1->y - v2->y;
+}
+
void internal_vec2_offset(Vec2* v, float offset, Vec2* out) {
ssr_assert(v && out);
out->x = v->x + offset;