public final int coordinatesToCellYIndex(Vector p) { return Modulo.mod((int) Math.round(Math.floor(p.y / cellHeight)), numberOfVerticalCells) + 1; }
public final int coordinatesToCellXIndex(Vector p) { return Modulo.mod((int) Math.round(Math.floor(p.x / cellWidth)), numberOfHorizontalCells) + 1; }