xamarin/urho-samples

Feature Sample Sound Synthesis has math error

utekai opened this issue · 0 comments

osc1 = osc1 + 1.0f % 360.0f;
osc2 = osc2 + 1.002f % 360.0f;

Those lines should be:

osc1 = (osc1 + 1.0f) % 360.0f;
osc2 = (osc2 + 1.002f) % 360.0f;

The idea is to clamp osc1 and osc2 under 360, but as is just adds ( 1 % 360 = 1) each iteration.