|
|
|
@ -71,7 +71,8 @@ template<class T> class Quaternion { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline static Quaternion<T> lerp(const Quaternion<T>& normalizedA, const Quaternion<T>& normalizedB, T t) { |
|
|
|
inline static Quaternion<T> lerp(const Quaternion<T>& normalizedA, const Quaternion<T>& normalizedB, T t) { |
|
|
|
CORRADE_ASSERT(MathTypeTraits<T>::equals(normalizedA.dot(), T(1)) && MathTypeTraits<T>::equals(normalizedB.dot(), T(1)), |
|
|
|
CORRADE_ASSERT(MathTypeTraits<T>::equals(normalizedA.dot(), T(1)) && MathTypeTraits<T>::equals(normalizedB.dot(), T(1)), |
|
|
|
"Math::Quaternion::lerp(): quaternions must be normalized", Quaternion<T>({}, std::numeric_limits<T>::quiet_NaN())); |
|
|
|
"Math::Quaternion::lerp(): quaternions must be normalized", |
|
|
|
|
|
|
|
Quaternion<T>({}, std::numeric_limits<T>::quiet_NaN())); |
|
|
|
return ((T(1) - t)*normalizedA + t*normalizedB).normalized(); |
|
|
|
return ((T(1) - t)*normalizedA + t*normalizedB).normalized(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|