示例#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;
 }