summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorjules <jules@okfoc.us>2013-12-16 18:31:16 -0500
committerjules <jules@okfoc.us>2013-12-16 18:31:16 -0500
commit712f556fe51bff5aa16e9da3e1190d4ac43dc744 (patch)
tree2989179c0ac0a36a1a380d8ef6c722db01e41668 /js/util.js
parentb9ec772c15b836a52bc789f080ceaeee644577fa (diff)
add help
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 f071596..e4c50dc 100644
--- a/js/util.js
+++ b/js/util.js
@@ -36,6 +36,7 @@ function randint(n){ return rand(n)|0 }
function choice(a){ return a[randint(a.length)] }
function deg(n){ return n*180/PI }
function rad(n){ return n*PI/180 }
+function pixel(x,y){ return 4*(y*w+x) }
function step (n,a,b) {
return clamp((n - a) / (b - a), 0.0, 1.0);