inPlaceInverseFft method

void inPlaceInverseFft(
  1. Float64x2List complexArray
)

In-place inverse FFT.

Performs an in-place inverse FFT on complexArray. The result is stored back in complexArray. No new arrays are allocated by this method.

Implementation

void inPlaceInverseFft(Float64x2List complexArray) {
  inPlaceFft(complexArray);
  final len = complexArray.length;
  final half = len >>> 1;
  final scale = Float64x2.splat(len.toDouble());
  complexArray[0] /= scale;
  if (len <= 1) return;
  for (int i = 1; i <= half; ++i) {
    final j = len - i;
    final temp = complexArray[j];
    complexArray[j] = complexArray[i] / scale;
    complexArray[i] = temp / scale;
  }
}