Fix: Made FFT work for T = float.

Also removed some trailing spaces from line ends.
This commit is contained in:
Ralph Tandetzky 2016-09-20 14:02:49 +02:00
parent 6a8798c453
commit 64800e61d8

View File

@ -136,10 +136,10 @@ class kissfft
const cpx_type twiddle_mul = exp( cpx_type(0, half_phi_inc) ); const cpx_type twiddle_mul = exp( cpx_type(0, half_phi_inc) );
for ( std::size_t k = 1; 2*k < N; ++k ) for ( std::size_t k = 1; 2*k < N; ++k )
{ {
const cpx_type w = 0.5 * cpx_type( const cpx_type w = (scalar_type)0.5 * cpx_type(
dst[k].real() + dst[N-k].real(), dst[k].real() + dst[N-k].real(),
dst[k].imag() - dst[N-k].imag() ); dst[k].imag() - dst[N-k].imag() );
const cpx_type z = 0.5 * cpx_type( const cpx_type z = (scalar_type)0.5 * cpx_type(
dst[k].imag() + dst[N-k].imag(), dst[k].imag() + dst[N-k].imag(),
-dst[k].real() + dst[N-k].real() ); -dst[k].real() + dst[N-k].real() );
const cpx_type twiddle = const cpx_type twiddle =