Don't rely on the M_PI constant since not all compilers provide it.

This commit is contained in:
Benoit Steiner 2016-03-04 16:42:38 -08:00
parent 60d9df11c1
commit ec35068edc

View File

@ -225,8 +225,9 @@ struct TensorEvaluator<const TensorFFTOp<FFT, ArgType, FFTResultType, FFTDir>, D
// For n > 2 we use the recurrence t_n = t_{n-1}^2 / t_{n-2} * t_1^2
pos_j_base_powered[0] = ComplexScalar(1, 0);
if (line_len > 1) {
const RealScalar PI(3.14159265358979323846);
const ComplexScalar pos_j_base = ComplexScalar(
std::cos(M_PI / line_len), std::sin(M_PI / line_len));
std::cos(PI / line_len), std::sin(PI / line_len));
pos_j_base_powered[1] = pos_j_base;
if (line_len > 2) {
const ComplexScalar pos_j_base_sq = pos_j_base * pos_j_base;