double dx = mx - px;
double dy = my - py;
double alpha = Math.atan2(dy, dx);
float angle = (float) Math.toDegrees(alpha);
angle += 10;
Now I want to convert the angle to the alpha value (atan2) is there a way how i can do that?
The purpose is that I have a game an want to fire bullets with a variation of the degree like a shotgun.
double newalpha = Math.toRadians(angle);