Skip to content

Commit

Permalink
Fixed issue #2 in a cross-platform way
Browse files Browse the repository at this point in the history
  • Loading branch information
jussi-kalliokoski committed Jan 5, 2013
1 parent 280db47 commit 474d6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int NodeFFT::reset (int ssize) {
size = ssize;

/* even N optimization */
if (!(size & 1)) {
if (!(size % 2)) {
kiss_state_real = kiss_fftr_alloc(size, 0, NULL, NULL);
kiss_state_real_i = kiss_fftr_alloc(size, 1, NULL, NULL);
}
Expand Down Expand Up @@ -98,7 +98,7 @@ Handle<Value> NodeFFT::Forward (const Arguments &args) {
kiss_fft_cpx *dout = nfft->temp_cplx_o;

/* if uneven N */
if (size & 1) {
if (size % 2) {
kiss_fft_cpx *din = nfft->temp_cplx_i;

for (int i=0; i<size; i++) {
Expand Down

0 comments on commit 474d6c7

Please sign in to comment.