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)
This commit is contained in:
thechosenone124 2018-05-30 23:36:37 -07:00 committed by GitHub
parent 20b3f4bd42
commit 8bbbbfcafd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ namespace glm
)
{
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>