summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-05-11 15:28:45 -0400
committerJules Laplace <jules@okfoc.us>2016-05-11 15:28:45 -0400
commit5e6b378965fc8e969309059aa4ea7e5d239ab3b5 (patch)
tree9022fd42a37896064fe9778f9534792dcca1e3d1 /js/util.js
parent3c5556c0610c4b28e78e012cd21812ff2b484fd8 (diff)
add inverted cross brush, smear brush, pick brush style..
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/util.js b/js/util.js
index 7859b2b..cdabbe1 100644
--- a/js/util.js
+++ b/js/util.js
@@ -47,6 +47,7 @@ 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 randnullsign(){ var r = random(); return r < 0.333 ? -1 : r < 0.666 ? 0 : 1 }
function xrandom(exp){ return Math.pow(Math.random(), exp) }
function xrand(exp,n){ return (xrandom(exp)*n) }