cara menghitung perbedaan sudut
public static double angleDiff(double a, double b) {
return ((((a - b) % 360F) + 540F) % 360F) - 180F;
}
Sms_Gamer_3808
public static double angleDiff(double a, double b) {
return ((((a - b) % 360F) + 540F) % 360F) - 180F;
}
var x = Math.PI * 1.9;
var y = Math.PI * 0.1;
Math.atan2(Math.sin(x-y), Math.cos(x-y)); // -Math.PI * 0.2