From 45d1be31d98ea6f52c4a12571f41e60226ea1046 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Mar 2018 17:21:12 +0100 Subject: build --- client/lib/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/lib/util.js') 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, } -- cgit v1.2.3-70-g09d2