From 2500be6bcba7d606f3f14df61a52eb0c56574bc4 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 1 Jun 2011 16:27:50 +0100 Subject: [PATCH] Fixed #95, shortMix implementation --- glm/gtx/quaternion.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index ec713c8d..b63e6c0f 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -256,7 +256,7 @@ namespace quaternion if(a <= typename detail::tquat::value_type(0)) return x; if(a >= typename detail::tquat::value_type(1)) return y; - float fCos = dot(x, y); + detail::tquat::value_type fCos = dot(x, y); detail::tquat y2(y); //BUG!!! tquat y2; if(fCos < typename detail::tquat::value_type(0)) { @@ -265,7 +265,7 @@ namespace quaternion } //if(fCos > 1.0f) // problem - float k0, k1; + detail::tquat::value_type k0, k1; if(fCos > typename detail::tquat::value_type(0.9999)) { k0 = typename detail::tquat::value_type(1) - a; @@ -295,7 +295,7 @@ namespace quaternion T const & a ) { - return glm::normalize(x * (1 - a) + (y * a)); + return glm::normalize(x * (detail::tquat::value_type(1) - a) + (y * a)); } }//namespace quaternion