aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-03-27 09:59:24 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-03-27 09:59:24 +0100
commit3d59ae02031c1aab8fbaa4457f06d31d9e9b2414 (patch)
treef30d88879273eb39955d391fc39766536acd85cf /Eigen/src
parent29eaa2b0f175a94b44be2a4b1d9ae7048b169e62 (diff)
Fix hypot(0,0).
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/MathFunctions.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h
index e1b233d82..3c240c272 100644
--- a/Eigen/src/Core/MathFunctions.h
+++ b/Eigen/src/Core/MathFunctions.h
@@ -328,6 +328,7 @@ struct hypot_impl
p = _y;
qp = _x / p;
}
+ if(p==RealScalar(0)) return RealScalar(0);
return p * sqrt(RealScalar(1) + qp*qp);
}
};