From e849a07762a2feb3f124a08d50adeed52f085d5b Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 11 Jul 2020 00:29:49 +0800 Subject: =?UTF-8?q?*=E5=8A=A0internal=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/math/vec4.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/math/vec4.c') diff --git a/src/math/vec4.c b/src/math/vec4.c index 3d6df46..24df08f 100644 --- a/src/math/vec4.c +++ b/src/math/vec4.c @@ -8,7 +8,7 @@ Vec4 vec4zero = { 0, 0, 0,0 }; static Vec4 sharedmat4; -void vec4_dividew(Vec4* v, Vec3* out) { +void internal_vec4_dividew(Vec4* v, Vec3* out) { ssr_assert(out && v); float w = 1.f / v->w; out->x = v->x * w ; @@ -16,7 +16,7 @@ void vec4_dividew(Vec4* v, Vec3* out) { out->z = v->z * w; } -void vec4_dividewnoz(Vec4* v, Vec4* out) { +void internal_vec4_dividewnoz(Vec4* v, Vec4* out) { ssr_assert(out && v); float w = 1.f / v->w; out->x = v->x * w; @@ -25,30 +25,30 @@ void vec4_dividewnoz(Vec4* v, Vec4* out) { out->w = v->w; } -void vec4_tostring(Vec4* v, char buf[]) { +void internal_vec4_tostring(Vec4* v, char buf[]) { sprintf(buf, "%8.3f %8.3f %8.3f %8.3f", v->x, v->y, v->z, v->w); } -void vec4_print(Vec4* v) { - vec4_tostring(v, printbuffer); +void internal_vec4_print(Vec4* v) { + internal_vec4_tostring(v, printbuffer); printf("\n%s\n", printbuffer); } -void vec4_lerp(Vec4* a, Vec4* b, float t, Vec4* out) { +void internal_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); } -void vec4_scale(Vec4* v, float t, Vec4* out) { +void internal_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; } -void vec4_add(Vec4* v1, Vec4* v2, Vec4* out) { +void internal_vec4_add(Vec4* v1, Vec4* v2, Vec4* out) { out->x = v1->x + v2->x; out->y = v1->y + v2->y; out->z = v1->z + v2->z; -- cgit v1.1-26-g67d0