From a0439c8d387579a1727ad00c2e105e7602aedbb6 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 12 Jul 2020 13:31:28 +0800 Subject: +mathlib --- src/math/vec4.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/math/vec4.c') 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; +} -- cgit v1.1-26-g67d0