From 058fa781d7f97796aa7df49c579fb06828aa46cc 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) (grafted from e0cff9ae0db1f37d9d463f8af09fd8298a6ccd0d ) --- 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 5a73f296b..3f2228533 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 { @@ -710,7 +710,7 @@ QuaternionBase::slerp(const Scalar& t, const QuaternionBase(scale0 * coeffs() + scale1 * other.coeffs()); }