The input sequence for which to calculate the FFT.
An array of complex numbers representing the FFT coefficients.
This is only defined for sequences of numbers at the moment it is a basic implementation and i plan on improving it in the future
const sequence = [1, 2, 3, 2];
const result = fft(sequence);
console.log(result);
// Output:
[
{ real: 8, imaginary: 0 },
{ real: -1.2246467991473532e-16, imaginary: 2 },
{ real: 0, imaginary: 0 },
{ real: -1.2246467991473532e-16, imaginary: 2 }
]
Generated using TypeDoc
Calculates the Fast Fourier Transform (FFT) of a sequence.