Пример #1
0
 public int getExperienceForLevel(int level) {
   if (level <= 15) return 17 * level;
   else if (level <= 30) return (int) ((1.5 * Math.pow(level, 2)) - (29.5 * level) + 360);
   else return (int) ((3.5 * Math.pow(level, 2)) - (151.5 * level) + 2220);
 }
Пример #2
0
 private float getRotationY(double x, double y, double z) {
   double dis1 = y - (this.y + 1);
   double dis2 = Math.sqrt(Math.pow(x - this.x, 2) + Math.pow(z - this.z, 2));
   return (float) ((Math.atan2(dis2, dis1) * 180D) / Math.PI) - 90F;
 }