This is for the love2d engine. Works with the latest version. Look at my intro to software project for some examples on how to use this
3 lines
94 B
Plaintext
3 lines
94 B
Plaintext
function InGrid(i,x,y,s)
|
|
return math.floor((i-1)/x)*s,(i-1)*s-(math.floor((i-1)/y)*(s*x))
|
|
end |