X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Ffourier.cpp;h=f7357cdf5363272c496e0634e16b2794b9799deb;hp=06145a3c628495a3736ea7c3bda724beedff2020;hb=d16eb37cbc73f67fc29a60645e0b1ac7fe32767e;hpb=663448e3173a19f054952806d8f8eca2fe59ec90 diff --git a/libctsim/fourier.cpp b/libctsim/fourier.cpp index 06145a3..f7357cd 100644 --- a/libctsim/fourier.cpp +++ b/libctsim/fourier.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: fourier.cpp,v 1.4 2001/01/28 19:10:18 kevin Exp $ +** $Id: fourier.cpp,v 1.5 2001/03/18 18:08:25 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -112,7 +112,7 @@ Fourier::shuffleNaturalToFourierOrder (double* pdVector, const int n) { double* pdTemp = new double [n]; int i; - if (n % 2) { // Odd + if (isOdd(n)) { // Odd int iHalfN = (n - 1) / 2; pdTemp[0] = pdVector[iHalfN]; @@ -139,7 +139,7 @@ Fourier::shuffleNaturalToFourierOrder (std::complex* pdVector, const int { std::complex* pdTemp = new std::complex [n]; int i; - if (n % 2) { // Odd + if (isOdd(n)) { // Odd int iHalfN = (n - 1) / 2; pdTemp[0] = pdVector[iHalfN]; @@ -167,7 +167,7 @@ Fourier::shuffleNaturalToFourierOrder (float* pdVector, const int n) { float* pdTemp = new float [n]; int i; - if (n % 2) { // Odd + if (isOdd (n)) { // Odd int iHalfN = (n - 1) / 2; pdTemp[0] = pdVector[iHalfN]; @@ -196,7 +196,7 @@ Fourier::shuffleFourierToNaturalOrder (double* pdVector, const int n) { double* pdTemp = new double [n]; int i; - if (n % 2) { // Odd + if (isOdd(n)) { // Odd int iHalfN = (n - 1) / 2; pdTemp[iHalfN] = pdVector[0]; @@ -224,7 +224,7 @@ Fourier::shuffleFourierToNaturalOrder (std::complex* pdVector, const int { std::complex* pdTemp = new std::complex [n]; int i; - if (n % 2) { // Odd + if (isOdd(n)) { // Odd int iHalfN = (n - 1) / 2; pdTemp[iHalfN] = pdVector[0]; @@ -254,7 +254,7 @@ Fourier::shuffleFourierToNaturalOrder (float* pVector, const int n) { float* pTemp = new float [n]; int i; - if (n % 2) { // Odd + if (isOdd (n)) { // Odd int iHalfN = (n - 1) / 2; pTemp[iHalfN] = pVector[0];