Ryan 204966f929 Added Files
Totally not ready
2017-06-10 17:10:46 -04:00

5 lines
143 B
Plaintext

function InGridY(i,w,h,xs,ys)
local xc,yc=math.floor(w/xs),math.floor(h/ys)
local xi,yi=math.floor((i-1)/yc),(i-1)%yc
return xi*xs,yi*ys
end