Fixed bug #806: Missing scalar type cast in Quaternion::setFromTwoVectors()

This commit is contained in:
Christoph Hertzberg 2014-05-05 14:22:27 +02:00
parent 0b7f95a03f
commit b5e3d76aa5

View File

@ -587,7 +587,7 @@ inline Derived& QuaternionBase<Derived>::setFromTwoVectors(const MatrixBase<Deri
// which yields a singular value problem
if (c < Scalar(-1)+NumTraits<Scalar>::dummy_precision())
{
c = max<Scalar>(c,-1);
c = (max)(c,Scalar(-1));
Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose();
JacobiSVD<Matrix<Scalar,2,3> > svd(m, ComputeFullV);
Vector3 axis = svd.matrixV().col(2);