summaryrefslogtreecommitdiff
path: root/src/math/vec4.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-12-08 21:29:29 +0800
committerchai <chaifix@163.com>2019-12-08 21:29:29 +0800
commit69d8af71d6882e801496fcd7ed971081c0b720d8 (patch)
tree452f7d037cf977e4a934d433bd2f12c03ed1ea10 /src/math/vec4.c
parent31be0df6255ef704bed28d2be56acbe1cea7caad (diff)
*misc
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 ca64820..b79adca 100644
--- a/src/math/vec4.c
+++ b/src/math/vec4.c
@@ -21,4 +21,11 @@ void vec4_tostring(Vec4* v, char buf[]) {
void vec4_print(Vec4* v) {
vec4_tostring(v, printbuffer);
printf("\n%s\n", printbuffer);
+}
+
+void vec4_lerp(Vec4* a, Vec4* b, float t, Vec4* out) {
+ out->x = lerp(a->x, b->x, t);
+ out->y = lerp(a->y, b->y, t);
+ out->z = lerp(a->z, b->z, t);
+ out->w = lerp(a->w, b->w, t);
} \ No newline at end of file