Merge pull request #344 from Lopuska/patch-3

removed unnecessary loop
This commit is contained in:
kcat 2019-09-14 18:34:53 -07:00 committed by GitHub
commit 1c45b1791b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,8 +55,6 @@ void complex_fft(const al::span<std::complex<double>> buffer, const double sign)
void complex_hilbert(const al::span<std::complex<double>> buffer)
{
std::for_each(buffer.begin(), buffer.end(), [](std::complex<double> &c) { c.imag(0.0); });
complex_fft(buffer, 1.0);
const double inverse_size = 1.0/static_cast<double>(buffer.size());