mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-12 22:15:27 -04:00
Fix typo in phase computation
This commit is contained in:
@@ -485,8 +485,10 @@ export function waveformN(partials, phases, type) {
|
||||
if (phase !== 0) {
|
||||
const c = Math.cos(PI2 * phase);
|
||||
const s = Math.sin(PI2 * phase);
|
||||
R = c * R - s * I;
|
||||
I = s * R + c * I;
|
||||
const R0 = R;
|
||||
const I0 = I;
|
||||
R = c * R0 - s * I0;
|
||||
I = s * R0 + c * I0;
|
||||
}
|
||||
real[n + 1] = R;
|
||||
imag[n + 1] = I;
|
||||
|
||||
Reference in New Issue
Block a user