Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static double smallestAngularDifferenceDegrees(double firstAngleDeg, double secondAngleDeg) {
        double d = ((firstAngleDeg - secondAngleDeg) * 3.141592653589793d) / 180.0d;
        return (Math.atan2(Math.sin(d), Math.cos(d)) * 180.0d) / 3.141592653589793d;
    }
}