diff options
Diffstat (limited to 'src/math/vec4.c')
-rw-r--r-- | src/math/vec4.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/math/vec4.c b/src/math/vec4.c index b79adca..202aabd 100644 --- a/src/math/vec4.c +++ b/src/math/vec4.c @@ -6,6 +6,8 @@ Vec4 vec4zero = { 0, 0, 0,0 }; +static Vec4 sharedmat4; + void vec4_dividew(Vec4* v, Vec3* out) { ssr_assert(out && v); float w = 1.f / v->w; @@ -28,4 +30,11 @@ void vec4_lerp(Vec4* a, Vec4* b, float t, Vec4* out) { 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 +} + +void vec4_scale(Vec4* v, float t, Vec4* out) { + out->x = v->x * t; + out->y = v->y * t; + out->z = v->z * t; + out->w = v->w * t; +} |