What I am trying to do is calculate the row and column of which an id is in. For example I have the grid
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
As you can see this is a 4x4 grid. I work out the row number by getting the id then dividing by the number of columns, and rounding this number down. For example rownumber = 5(id value)/4(number of columns) = 1.25 then round down = 1. But what I can't figure out is how to get the column number of say the number 6.