diff options
author | 2015-03-27 09:59:24 +0100 | |
---|---|---|
committer | 2015-03-27 09:59:24 +0100 | |
commit | 3d59ae02031c1aab8fbaa4457f06d31d9e9b2414 (patch) | |
tree | f30d88879273eb39955d391fc39766536acd85cf /Eigen/src | |
parent | 29eaa2b0f175a94b44be2a4b1d9ae7048b169e62 (diff) |
Fix hypot(0,0).
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 1 |
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); } }; |