summaryrefslogtreecommitdiff
path: root/client/lib/util.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-02-21 13:55:53 +0100
committerJules Laplace <julescarbon@gmail.com>2018-02-21 13:55:53 +0100
commitaf6def37c29d662be9b6f56e8c2c8c818b35068d (patch)
tree156a0b66454dacc4b1c5649138ba5ac1a260a84e /client/lib/util.js
parent9f68262f9eb4720b4d6466e1cf5cf9c0edb9c286 (diff)
undergraduate level
Diffstat (limited to 'client/lib/util.js')
-rw-r--r--client/lib/util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/lib/util.js b/client/lib/util.js
index 6d8577a..48145e0 100644
--- a/client/lib/util.js
+++ b/client/lib/util.js
@@ -14,7 +14,7 @@ const browser = { isIphone, isIpad, isMobile, isDesktop }
function clamp(n,a,b){ return n<a?a:n<b?n:b }
function choice (a){ return a[ Math.floor(Math.random() * a.length) ] }
function mod(n,m){ return n-(m * Math.floor(n/m)) }
-function randint(n){ return Math.random(n)|0 }
+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 }