diff options
author | 2015-12-28 17:34:06 -0800 | |
---|---|---|
committer | 2015-12-28 17:34:06 -0800 | |
commit | afb35385bf565d3ddaee50b1da5b664422818934 (patch) | |
tree | c8b41efe64283c17478a680feb1611fcc4da7417 /Eigen | |
parent | 14897600b77ce8400780f0f34a7bb3661ce5db62 (diff) |
Change PI* to M_PI* in SpecialFunctions to avoid possible breakage
with external DEFINEs.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/SpecialFunctions.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/SpecialFunctions.h b/Eigen/src/Core/SpecialFunctions.h index 9fff3d74b..a5f9cb62a 100644 --- a/Eigen/src/Core/SpecialFunctions.h +++ b/Eigen/src/Core/SpecialFunctions.h @@ -189,7 +189,7 @@ struct digamma_impl<float> { bool negative; // Some necessary constants - const float PIF = 3.141592653589793238; + const float M_PIF = 3.141592653589793238; const float MAXNUMF = std::numeric_limits<float>::infinity(); const float A[] = { @@ -215,7 +215,7 @@ struct digamma_impl<float> { p += 1.0f; nz = q - p; } - nz = PIF / ::tan(PIF * nz); + nz = M_PIF / ::tan(M_PIF * nz); } else { nz = 0.0f; } @@ -315,7 +315,7 @@ struct digamma_impl<double> { }; const double MAXNUM = std::numeric_limits<double>::infinity(); - const double PI = 3.14159265358979323846; + const double M_PI = 3.14159265358979323846; negative = 0; nz = 0.0; @@ -327,7 +327,7 @@ struct digamma_impl<double> { if (p == q) { return MAXNUM; } - /* Remove the zeros of tan(PI x) + /* Remove the zeros of tan(M_PI x) * by subtracting the nearest integer from x */ nz = q - p; @@ -336,7 +336,7 @@ struct digamma_impl<double> { p += 1.0; nz = q - p; } - nz = PI / ::tan(PI * nz); + nz = M_PI / ::tan(M_PI * nz); } else { nz = 0.0; |