summaryrefslogtreecommitdiff
path: root/src/math/vec4.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/vec4.c')
-rw-r--r--src/math/vec4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/math/vec4.c b/src/math/vec4.c
index 202aabd..71ec6b6 100644
--- a/src/math/vec4.c
+++ b/src/math/vec4.c
@@ -38,3 +38,10 @@ void vec4_scale(Vec4* v, float t, Vec4* out) {
out->z = v->z * t;
out->w = v->w * t;
}
+
+void vec4_add(Vec4* v1, Vec4* v2, Vec4* out) {
+ out->x = v1->x + v2->x;
+ out->y = v1->y + v2->y;
+ out->z = v1->z + v2->z;
+ out->w = v1->w + v2->w;
+}