From e7dc01fc063f2d6e59d467803b30cec00e51cf3b Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 26 Mar 2013 00:28:29 +0100 Subject: [PATCH] Fixed slerp, linear interpolation when cosTheta is close to 1, #65 --- 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 0b9d2051..8b83865a 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -512,10 +512,10 @@ namespace detail { // Linear interpolation return detail::tquat( - mix(x.w, y.w, a), - mix(x.x, y.x, a), - mix(x.y, y.y, a), - mix(x.z, y.z, a)); + mix(x.w, z.w, a), + mix(x.x, z.x, a), + mix(x.y, z.y, a), + mix(x.z, z.z, a)); } else {