diff options
| author | jules <jules@okfoc.us> | 2014-01-26 02:55:13 -0500 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2014-01-26 02:55:13 -0500 |
| commit | fb322430f61b32af4e22d5136704ce87ddfd6f3a (patch) | |
| tree | b7ff726d4b5e7ba425640ce1a1e8eeafc3008705 /js/util.js | |
| parent | 41c9d39a851a159d6a2e34fafb975e7c66bddf63 (diff) | |
actual_w, actual_h to fix rgbpixel on resized workspace
Diffstat (limited to 'js/util.js')
| -rw-r--r-- | js/util.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -43,7 +43,7 @@ function choice(a){ return a[randint(a.length)] } function deg(n){ return n*180/PI } function rad(n){ return n*PI/180 } function xor(a,b){ a=!!a; b=!!b; return (a||b) && !(a&&b) } -function pixel(x,y){ return 4*(mod(y,h)*w+mod(x,w)) } +function pixel(x,y){ return 4*(mod(y,actual_h)*actual_w+mod(x,actual_w)) } function rgbpixel(d,x,y){ var p = pixel(~~x,~~y) r = d[p] |
