how to calculate difference of angles code example
Example: how to calculate angle difference
public static double angleDiff(double a, double b) {
return ((((a - b) % 360F) + 540F) % 360F) - 180F;
}
public static double angleDiff(double a, double b) {
return ((((a - b) % 360F) + 540F) % 360F) - 180F;
}