aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-10-31 23:26:01 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-10-31 23:26:01 +0100
commitc7eda0d866f59c01598168805f5cd20206e64732 (patch)
tree57d38797db6529a7af7623a346831af3a7c20117 /Eigen/src/Geometry
parent006c9a5105475ce68d3009af11f41106d91e6838 (diff)
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 !
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r--Eigen/src/Geometry/AngleAxis.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Geometry/AngleAxis.h b/Eigen/src/Geometry/AngleAxis.h
index f3398d0be..adab3ce32 100644
--- a/Eigen/src/Geometry/AngleAxis.h
+++ b/Eigen/src/Geometry/AngleAxis.h
@@ -176,7 +176,7 @@ AngleAxis<Scalar>& AngleAxis<Scalar>::operator=(const QuaternionBase<QuatDerived
}
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);
}
return *this;