diff options
Diffstat (limited to 'Eigen/src/Geometry/EulerAngles.h')
-rw-r--r-- | Eigen/src/Geometry/EulerAngles.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Eigen/src/Geometry/EulerAngles.h b/Eigen/src/Geometry/EulerAngles.h index e424d2406..216307706 100644 --- a/Eigen/src/Geometry/EulerAngles.h +++ b/Eigen/src/Geometry/EulerAngles.h @@ -32,6 +32,7 @@ template<typename Derived> inline Matrix<typename MatrixBase<Derived>::Scalar,3,1> MatrixBase<Derived>::eulerAngles(Index a0, Index a1, Index a2) const { + using std::atan2; /* Implemented from Graphics Gems IV */ EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived,3,3) @@ -47,31 +48,31 @@ MatrixBase<Derived>::eulerAngles(Index a0, Index a1, Index a2) const if (a0==a2) { Scalar s = Vector2(coeff(j,i) , coeff(k,i)).norm(); - res[1] = internal::atan2(s, coeff(i,i)); + res[1] = atan2(s, coeff(i,i)); if (s > epsilon) { - res[0] = internal::atan2(coeff(j,i), coeff(k,i)); - res[2] = internal::atan2(coeff(i,j),-coeff(i,k)); + res[0] = atan2(coeff(j,i), coeff(k,i)); + res[2] = atan2(coeff(i,j),-coeff(i,k)); } else { res[0] = Scalar(0); - res[2] = (coeff(i,i)>0?1:-1)*internal::atan2(-coeff(k,j), coeff(j,j)); + res[2] = (coeff(i,i)>0?1:-1)*atan2(-coeff(k,j), coeff(j,j)); } } else { Scalar c = Vector2(coeff(i,i) , coeff(i,j)).norm(); - res[1] = internal::atan2(-coeff(i,k), c); + res[1] = atan2(-coeff(i,k), c); if (c > epsilon) { - res[0] = internal::atan2(coeff(j,k), coeff(k,k)); - res[2] = internal::atan2(coeff(i,j), coeff(i,i)); + res[0] = atan2(coeff(j,k), coeff(k,k)); + res[2] = atan2(coeff(i,j), coeff(i,i)); } else { res[0] = Scalar(0); - res[2] = (coeff(i,k)>0?1:-1)*internal::atan2(-coeff(k,j), coeff(j,j)); + res[2] = (coeff(i,k)>0?1:-1)*atan2(-coeff(k,j), coeff(j,j)); } } if (!odd) |