Merge pull request 'Bug Fix: Fix typo in phase computation' (#1974) from glossing/phases-bugfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1974
This commit is contained in:
commit
ef5ddc90c2
1 changed files with 4 additions and 2 deletions
|
|
@ -485,8 +485,10 @@ export function waveformN(partials, phases, type) {
|
||||||
if (phase !== 0) {
|
if (phase !== 0) {
|
||||||
const c = Math.cos(PI2 * phase);
|
const c = Math.cos(PI2 * phase);
|
||||||
const s = Math.sin(PI2 * phase);
|
const s = Math.sin(PI2 * phase);
|
||||||
R = c * R - s * I;
|
const R0 = R;
|
||||||
I = s * R + c * I;
|
const I0 = I;
|
||||||
|
R = c * R0 - s * I0;
|
||||||
|
I = s * R0 + c * I0;
|
||||||
}
|
}
|
||||||
real[n + 1] = R;
|
real[n + 1] = R;
|
||||||
imag[n + 1] = I;
|
imag[n + 1] = I;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue