예제 #1
0
 private static double workoutY1(double x, double y, int i, int allnum) {
   if (x != Ox) {
     double tana = (y - Oy) / (x - Ox) * R / r;
     alpha = Math.atan(tana);
     if (x <= Ox) alpha = alpha + Math.PI;
   } else alpha = Math.PI / 2;
   return (r * Math.sin(alpha - 2 * Math.PI * i / (allnum)) + Oy);
 }
예제 #2
0
 private static double yForPlayer(int i) {
   return (30 * Math.sin(Math.PI / 2 - 2 * Math.PI * i / numOfPlayers));
 }