diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-03-02 17:21:12 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-03-02 17:21:12 +0100 |
| commit | 45d1be31d98ea6f52c4a12571f41e60226ea1046 (patch) | |
| tree | 92228d63675ae1060d3a6aeab56508b4b8d57229 /client/lib/util.js | |
| parent | c5d09fb560580403bb248146dd375dd7af14dff8 (diff) | |
build
Diffstat (limited to 'client/lib/util.js')
| -rw-r--r-- | client/lib/util.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/lib/util.js b/client/lib/util.js index 48145e0..504c562 100644 --- a/client/lib/util.js +++ b/client/lib/util.js @@ -17,6 +17,7 @@ function mod(n,m){ return n-(m * Math.floor(n/m)) } function randint(n){ return (Math.random()*n)|0 } function randrange(a,b){ return a + Math.random() * (b-a) } function randsign(){ return Math.random() >= 0.5 ? -1 : 1 } +function lerp(n,a,b){ return (b-a)*n+a } function requestAudioContext (fn) { if (isMobile) { @@ -62,7 +63,7 @@ function requestAudioContext (fn) { } export { - choice, mod, clamp, + choice, mod, clamp, lerp, randint, randrange, randsign, browser, requestAudioContext, } |
