diff options
Diffstat (limited to 'client/lib/util.js')
| -rw-r--r-- | client/lib/util.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/lib/util.js b/client/lib/util.js index b1ce162..7fad313 100644 --- a/client/lib/util.js +++ b/client/lib/util.js @@ -18,6 +18,9 @@ function choice(a) { function mod(n, m) { return n - m * Math.floor(n / m); } +function roundFreq(freq) { + return Math.round(freq * 100); +} function requestAudioContext(fn) { if (window.location.protocol !== "https:") { @@ -62,4 +65,4 @@ function requestAudioContext(fn) { } } -export { choice, mod, browser, requestAudioContext }; +export { choice, mod, browser, roundFreq, requestAudioContext }; |
