diff options
Diffstat (limited to 'client/lib')
| -rw-r--r-- | client/lib/util.js | 2 |
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 } |
