From 69d8af71d6882e801496fcd7ed971081c0b720d8 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 8 Dec 2019 21:29:29 +0800 Subject: *misc --- src/math/vec4.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/math/vec4.c') 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 -- cgit v1.1-26-g67d0