diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-08-15 10:24:27 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-08-15 10:24:27 +0200 |
commit | bff4238d154c1bbb37abd5f5df1bf04f0117e2cc (patch) | |
tree | c875f644c2239e40fbead1b84e59086e1bd299a6 /Eigen/src/Geometry | |
parent | 109a4f650bb69f1565f9562b384d711e36c56b26 (diff) |
fix setFromTwoVectors because of the change in sorting of the the singular values
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r-- | Eigen/src/Geometry/Quaternion.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 2f9f97807..3d59533f4 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -373,7 +373,7 @@ inline Quaternion<Scalar>& Quaternion<Scalar>::setFromTwoVectors(const MatrixBas c = std::max<Scalar>(c,-1); Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose(); SVD<Matrix<Scalar,2,3> > svd(m); - Vector3 axis = svd.matrixV().col(2); + Vector3 axis = svd.matrixV().col(0); Scalar w2 = (Scalar(1)+c)*Scalar(0.5); this->w() = ei_sqrt(w2); |