diff options
Diffstat (limited to 'src/math/vec4.c')
-rw-r--r-- | src/math/vec4.c | 7 |
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 |