diff options
author | chai <chaifix@163.com> | 2019-12-08 02:39:57 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-08 02:39:57 +0800 |
commit | 8518e135ff5c312bd5a3b496d400c751aa3bd5b3 (patch) | |
tree | 96ea48d2046b0ecc3ff791efd8fe7a5780ad52e5 /src/math | |
parent | 0c4b1e68d64996a4aa5b136ddb6ee5643e159ef2 (diff) |
*光源
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/vec3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/vec3.c b/src/math/vec3.c index 1deb52e..917c4d1 100644 --- a/src/math/vec3.c +++ b/src/math/vec3.c @@ -97,8 +97,8 @@ void vec3_multiply(Vec3* v1, Vec3* v2, Quat* out) { void vec3_normalize(Vec3* v, Vec3* out) { ssr_assert(v && out); - float mag = rsqrt(v->x * v->x + v->y * v->y + v->z * v->z); - //float mag = 1.f / vec3_magnitude(v); + //float mag = rsqrt(v->x * v->x + v->y * v->y + v->z * v->z); + float mag = 1.f / vec3_magnitude(v); out->x = v->x * mag; out->y = v->y * mag; out->z = v->z * mag; |