示例#1
0
 public static Velocity getCollisonFriendlz(Velocity v) {
   Velocity ve = new Velocity(0, 0);
   //		ve.setX(v.getX()/(0.25f/4)*(0.25f/4));
   //		ve.setZ(v.getZ()/(0.25f/4)*(0.25f/4));
   ve.setX((((int) (v.getX() * 10000)) / 625 * 625) / 10000f);
   ve.setZ((((int) (v.getZ() * 10000)) / 625 * 625) / 10000f);
   return ve;
 }