diff --git a/src/math/vector.cpp b/src/math/vector.cpp index f93a52ab..21edf220 100644 --- a/src/math/vector.cpp +++ b/src/math/vector.cpp @@ -492,7 +492,7 @@ template<> quat quat::slerp(quat QuatA, quat QuatB, float const &Scalar) //btAssert(magnitude > btScalar(0)); float product = lol::dot(QuatA,QuatB) / magnitude; - if (product != 1.0f) + if (product > -1.0f && product < 1.0f) { // Take care of long angle case see http://en.wikipedia.org/wiki/Slerp const float sign = (product < 0.0f) ? -1.0f : 1.0f;