From 8bbbbfcafda418b47cf463c72568a8a84c90207f Mon Sep 17 00:00:00 2001 From: thechosenone124 Date: Wed, 30 May 2018 23:36:37 -0700 Subject: [PATCH] Intermediate Function Is Improperly Done The formula for calculating the intermediate for a SQUAD interpolation is exp((log(next * invQuat) + log(prev * invQuat)) / static_cast(-4)) * curr; The current code uses addition instead of multiplication (based on http://web.mit.edu/2.998/www/QuaternionReport1.pdf) --- glm/gtx/quaternion.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index fde7a8fb..e2aa5102 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -45,7 +45,7 @@ namespace glm ) { tquat invQuat = inverse(curr); - return exp((log(next + invQuat) + log(prev + invQuat)) / static_cast(-4)) * curr; + return exp((log(next * invQuat) + log(prev * invQuat)) / static_cast(-4)) * curr; } template