diff options
| author | jules <jules@okfoc.us> | 2014-01-07 18:45:22 -0500 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2014-01-07 18:45:22 -0500 |
| commit | cce4f73a1637d54ab7c096815864a2c9c66fda65 (patch) | |
| tree | 76c3e9964ddcb34e8c82835a13029a40681a10ea /js | |
| parent | b7c1ec511fc3afcf04321751fc8e0d9858b2dcd5 (diff) | |
xor
Diffstat (limited to 'js')
| -rw-r--r-- | js/util.js | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -42,6 +42,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 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 rgbpixel(d,x,y){ var p = pixel(~~x,~~y) |
