From b5eb654ff043651a7302de3695512d266031bbc1 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 22 Aug 2017 23:58:31 +0200 Subject: [PATCH] Fixed Visual C++ /W4 warnings --- glm/gtc/quaternion.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index edfb6e9a..5314d1fa 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -150,7 +150,7 @@ namespace detail { T norm_u_norm_v = sqrt(dot(u, u) * dot(v, v)); T real_part = norm_u_norm_v + dot(u, v); - vec<3, T, Q> w; + vec<3, T, Q> t; if(real_part < static_cast(1.e-6f) * norm_u_norm_v) { @@ -158,15 +158,15 @@ namespace detail // around an arbitrary orthogonal axis. Axis normalisation // can happen later, when we normalise the quaternion. real_part = static_cast(0); - w = abs(u.x) > abs(u.z) ? vec<3, T, Q>(-u.y, u.x, static_cast(0)) : vec<3, T, Q>(static_cast(0), -u.z, u.y); + t = abs(u.x) > abs(u.z) ? vec<3, T, Q>(-u.y, u.x, static_cast(0)) : vec<3, T, Q>(static_cast(0), -u.z, u.y); } else { // Otherwise, build quaternion the standard way. - w = cross(u, v); + t = cross(u, v); } - *this = normalize(tquat(real_part, w.x, w.y, w.z)); + *this = normalize(tquat(real_part, t.x, t.y, t.z)); } template