Skip to content

Commit

Permalink
Round off freq_dramp at 4 digits to match others.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed May 4, 2023
1 parent d265c73 commit 2385958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sfxr.js
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ var units = {
p_freq_ramp: function (v) {
return (44100*Math.log(v)/Math.log(0.5)).toPrecision(4) + ' 8va/sec'; },
p_freq_dramp: function (v) {
return (v*44100 / Math.pow(2, -44101./44100)).toExponential(4) +
return (v*44100 / Math.pow(2, -44101./44100)).toExponential(3) +
' 8va/s^2'; },

p_vib_speed: function (v) { return v === 0 ? 'OFF' :
Expand Down

0 comments on commit 2385958

Please sign in to comment.