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<T>(-4)) * curr;

The current code uses addition instead of multiplication (based on http://web.mit.edu/2.998/www/QuaternionReport1.pdf)
master
thechosenone124 ago%!(EXTRA string=7 years) committed by GitHub
parent 20b3f4bd42
commit 8bbbbfcafd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      glm/gtx/quaternion.inl

@ -45,7 +45,7 @@ namespace glm
) )
{ {
tquat<T, Q> invQuat = inverse(curr); tquat<T, Q> invQuat = inverse(curr);
return exp((log(next + invQuat) + log(prev + invQuat)) / static_cast<T>(-4)) * curr; return exp((log(next * invQuat) + log(prev * invQuat)) / static_cast<T>(-4)) * curr;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>

Loading…
Cancel
Save