Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@@ -38,16 +38,26 @@ public class FFTBluestein {
for (int i = 0; i < N; i++) {
double angle = (i - N + 1) * (i - N + 1) * Math.PI / N * direction;
bn.set(i, new FFT.Complex(Math.cos(angle), Math.sin(angle)));
bn.set(bnSize - i - 1, new FFT.Complex(Math.cos(angle), Math.sin(angle)));
bn.set(
bnSize - i - 1,
new FFT.Complex(Math.cos(angle), Math.sin(angle))
);
}
/* Initialization of the a(n) sequence */
for (int i = 0; i < N; i++) {
double angle = -i * i * Math.PI / N * direction;
an.add(x.get(i).multiply(new FFT.Complex(Math.cos(angle), Math.sin(angle))));
an.add(
x
.get(i)
.multiply(new FFT.Complex(Math.cos(angle), Math.sin(angle)))
);
}
ArrayList<FFT.Complex> convolution = ConvolutionFFT.convolutionFFT(an, bn);
ArrayList<FFT.Complex> convolution = ConvolutionFFT.convolutionFFT(
an,
bn
);
/* The final multiplication of the convolution with the b*(k) factor */
for (int i = 0; i < N; i++) {