I have the following function
public float getAngle(Point p2) {
return (float) (MathUtils.radiansToDegrees * (Math.atan2(p2.y - y, p2.x - x)));
}
The problem I have is that the angles returned look like -20 (I would expect 20) or 50 when I would expect 310. What is the right way to get the values in the "normal" range from 0 to 359 anticlockwise?