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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/math/vec4.c b/src/math/vec4.c
index 24df08f..f4648c7 100644
--- a/src/math/vec4.c
+++ b/src/math/vec4.c
@@ -54,3 +54,17 @@ void internal_vec4_add(Vec4* v1, Vec4* v2, Vec4* out) {
out->z = v1->z + v2->z;
out->w = v1->w + v2->w;
}
+
+void internal_vec4_minus(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;
+}
+
+void internal_vec4_plus(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;
+}