From f4eee2184b439c4e60edd3215441a212bf2bae58 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 17 Dec 2013 10:06:37 -0500 Subject: weird ish when loading gif still --- js/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/util.js') diff --git a/js/util.js b/js/util.js index 3a03f55..fb15fb5 100644 --- a/js/util.js +++ b/js/util.js @@ -40,7 +40,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 pixel(x,y){ return 4*(mod(y,h)*w+mod(x,w)) } function rgbpixel(d,x,y){ var p = pixel(x,y) r = d[p] -- cgit v1.2.3-70-g09d2