Calculate Fourier transform (FFT) on a given array.
buffer | Input data for the transform. |
N | The length of the transform (optional). |
return value | The transformed version of the input. |
Argument N is optional. If given and longer than the length of the buffer, the buffer will be padded with zeros to the appropriate length. This will increase the resolution of the transform.
fft([1,2,3,4,5,6,7,8])