mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Several compilation fixes for MSVC and NVCC, basically:
- added explicit enum to int conversion where needed - if a function is not defined as declared and the return type is "tricky" then the type must be typedefined somewhere. A "tricky return type" can be: * a template class with a default parameter which depends on another template parameter * a nested template class, or type of a nested template class
This commit is contained in:
@@ -356,10 +356,10 @@ Quaternion<Scalar> Quaternion<Scalar>::slerp(Scalar t, const Quaternion& other)
|
||||
// 2 - Quaternion slerp(Scalar t, const Quaternion& other) const
|
||||
// which returns the s-lerp between this and other
|
||||
// ??
|
||||
if (*this == other)
|
||||
if (m_coeffs == other.m_coeffs)
|
||||
return *this;
|
||||
|
||||
Scalar d = this->dot(other);
|
||||
Scalar d = m_coeffs.dot(other.m_coeffs);
|
||||
|
||||
// theta is the angle between the 2 quaternions
|
||||
Scalar theta = std::acos(ei_abs(d));
|
||||
@@ -370,7 +370,7 @@ Quaternion<Scalar> Quaternion<Scalar>::slerp(Scalar t, const Quaternion& other)
|
||||
if (d<0)
|
||||
scale1 = -scale1;
|
||||
|
||||
return scale0 * (*this) + scale1 * other;
|
||||
return Quaternion(scale0 * m_coeffs + scale1 * other.m_coeffs);
|
||||
}
|
||||
|
||||
// set from a rotation matrix
|
||||
|
||||
Reference in New Issue
Block a user