From da81e863e2f01a32b228679a7a2d928d366fd4be Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Mon, 5 May 2014 14:22:27 +0200 Subject: [PATCH] Fixed bug #806: Missing scalar type cast in Quaternion::setFromTwoVectors() (transplanted from b5e3d76aa50dd4adc63ebb1e20e6693e261aa7dc ) --- Eigen/src/Geometry/Quaternion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index ee97eaf4c..f06653f1c 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -586,7 +586,7 @@ inline Derived& QuaternionBase::setFromTwoVectors(const MatrixBase::dummy_precision()) { - c = max(c,-1); + c = (max)(c,Scalar(-1)); Matrix m; m << v0.transpose(), v1.transpose(); JacobiSVD > svd(m, ComputeFullV); Vector3 axis = svd.matrixV().col(2);