diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/util.js | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -46,6 +46,7 @@ function random(){ return Math.random() } function rand(n){ return (Math.random()*n) } function randint(n){ return rand(n)|0 } function randrange(a,b){ return a + rand(b-a) } +function randsign(){ return random() >= 0.5 ? -1 : 1 } function choice(a){ return a[randint(a.length)] } function deg(n){ return n*180/PI } function rad(n){ return n*PI/180 } |
