diff options
author | chai <chaifix@163.com> | 2020-07-12 13:31:28 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-07-12 13:31:28 +0800 |
commit | a0439c8d387579a1727ad00c2e105e7602aedbb6 (patch) | |
tree | 8ea09b13e179a7d8cd9ac6518410cd10035f48f4 /src/math/vec4.c | |
parent | ec7aa42781a9108901fbde7210d8285bbbeaf5fc (diff) |
+mathlib
Diffstat (limited to 'src/math/vec4.c')
-rw-r--r-- | src/math/vec4.c | 14 |
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; +} |