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