From e0cff9ae0db1f37d9d463f8af09fd8298a6ccd0d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 15 Apr 2015 14:48:53 +0200 Subject: [PATCH] Fix bug #996: fix comparisons to 0 instead of Scalar(0) --- Eigen/src/Geometry/Quaternion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index a89d75958..99b65c231 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -637,7 +637,7 @@ inline Quaternion::Scalar> QuaternionBasesquaredNorm(); - if (n2 > 0) + if (n2 > Scalar(0)) return Quaternion(conjugate().coeffs() / n2); else { @@ -723,7 +723,7 @@ QuaternionBase::slerp(const Scalar& t, const QuaternionBase(scale0 * coeffs() + scale1 * other.coeffs()); }