angle Diff - Android java.lang

Android examples for java.lang:Math Trigonometric Function

Description

angle Diff

Demo Code


//package com.java2s;

public class Main {
    public static double angleDiff(double a, double b) {
        double dif = Math.IEEEremainder(b - a + 180, 360);
        if (dif < 0)
            dif += 360;/*from w w w. j  a  va2 s .co  m*/
        return dif - 180;
    }
}

Related Tutorials