mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Don't rely on the M_PI constant since not all compilers provide it.
This commit is contained in:
parent
60d9df11c1
commit
ec35068edc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user