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); }
private static double yForPlayer(int i) { return (30 * Math.sin(Math.PI / 2 - 2 * Math.PI * i / numOfPlayers)); }