Staying in the boundaries of the grid when projecting position to mathematical index.