diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2016-03-23 15:37:45 +0100 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2016-03-23 15:37:45 +0100 |
commit | 9642fd7a937942037a3ea0d3c51b799be197782f (patch) | |
tree | 6ff10ef44faf350274ac0a87e5f4eb535dd73250 /unsupported/test | |
parent | 28e02996df54240d44ead1bf827b867c22a224a9 (diff) |
Replace all M_PI by EIGEN_PI and add a check to the testsuite.
Diffstat (limited to 'unsupported/test')
-rw-r--r-- | unsupported/test/matrix_function.cpp | 4 | ||||
-rw-r--r-- | unsupported/test/matrix_power.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/test/matrix_function.cpp b/unsupported/test/matrix_function.cpp index 487d5a9b8..9a995f941 100644 --- a/unsupported/test/matrix_function.cpp +++ b/unsupported/test/matrix_function.cpp @@ -113,8 +113,8 @@ void testMatrixLogarithm(const MatrixType& A) MatrixType scaledA; RealScalar maxImagPartOfSpectrum = A.eigenvalues().imag().cwiseAbs().maxCoeff(); - if (maxImagPartOfSpectrum >= 0.9 * M_PI) - scaledA = A * 0.9 * M_PI / maxImagPartOfSpectrum; + if (maxImagPartOfSpectrum >= 0.9 * EIGEN_PI) + scaledA = A * 0.9 * EIGEN_PI / maxImagPartOfSpectrum; else scaledA = A; diff --git a/unsupported/test/matrix_power.cpp b/unsupported/test/matrix_power.cpp index baf183d12..8e104ed1e 100644 --- a/unsupported/test/matrix_power.cpp +++ b/unsupported/test/matrix_power.cpp @@ -24,7 +24,7 @@ void test2dRotation(double tol) s = std::sin(angle); B << c, s, -s, c; - C = Apow(std::ldexp(angle,1) / M_PI); + C = Apow(std::ldexp(angle,1) / EIGEN_PI); std::cout << "test2dRotation: i = " << i << " error powerm = " << relerr(C,B) << '\n'; VERIFY(C.isApprox(B, tol)); } |