mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-11 08:53:14 +08:00
Let's be safe: enable auto normalization is quaternion to angle-axis code since a slight numerical issue may trigger NaN. The overhead is small and I doubt the perf of this function could be critival for any application !
This commit is contained in:
parent
006c9a5105
commit
c7eda0d866
@ -176,7 +176,7 @@ AngleAxis<Scalar>& AngleAxis<Scalar>::operator=(const QuaternionBase<QuatDerived
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_angle = 2*std::acos(q.w());
|
m_angle = Scalar(2)*std::acos(q.w()/*/internal::sqrt(n2+q.w()*q.w())*/);
|
||||||
m_axis = q.vec() / internal::sqrt(n2);
|
m_axis = q.vec() / internal::sqrt(n2);
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user