[fix] change the divisor in DFT to be compiled as a variable for FPGAs, instead of a constant value
@@ -33,7 +33,7 @@ public class DFTDynamic {
float sumreal = 0;
float sumimag = 0;
for (int t = 0; t < inputSize[0]; t++) { // For each input element
- float angle = ((2 * TornadoMath.floatPI() * t * k) / (float) n);
+ float angle = ((2 * TornadoMath.floatPI() * t * k) / (float) inputSize[0]);
sumreal += (inreal[t] * (TornadoMath.floatCos(angle)) + inimag[t] * (TornadoMath.floatSin(angle)));
sumimag += -(inreal[t] * (TornadoMath.floatSin(angle)) + inimag[t] * (TornadoMath.floatCos(angle)));
}
