diff options
| author | Vasile Vilvoiu <vasi@vilvoiu.ro> | 2021-07-20 18:48:12 +0300 |
|---|---|---|
| committer | Vasile Vilvoiu <vasi@vilvoiu.ro> | 2021-07-20 18:48:12 +0300 |
| commit | 5ac2df934fd908b8be4509484edb4f369b910999 (patch) | |
| tree | 2f26c46a2d4b1845ef65db2e6ff9a1d142077ec2 | |
| parent | 0f515bbd97712bf0fb11012b898e314770d5255e (diff) | |
Revert "Change M_PI to std::numbers::pi."
This reverts commit 0f515bbd97712bf0fb11012b898e314770d5255e.
Won't compile under gcc as deployed with Ubuntu 20.04.
| -rw-r--r-- | src/window-function.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/window-function.cpp b/src/window-function.cpp index 64ea14e..d52ae6d 100644 --- a/src/window-function.cpp +++ b/src/window-function.cpp @@ -7,7 +7,6 @@ #include "window-function.hpp" #include <cassert> -#include <numbers> WindowFunction::WindowFunction(std::size_t window_size) : window_size_(window_size) { @@ -70,7 +69,7 @@ GeneralizedCosineWindowFunction::GeneralizedCosineWindowFunction(std::size_t win this->cached_factors_[n] = 0; for (unsigned int k = 0; k < a.size(); k++) { this->cached_factors_[n] += - std::pow<double>(-1.0f, k) * a[k] * std::cos(2.0 * std::numbers::pi * k * (double)n / N); + std::pow<double>(-1.0f, k) * a[k] * std::cos(2.0 * (double)M_PI * k * (double)n / N); } } } |
