The smallest positive angle calculator code example
Example: calculate smallest 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;
}