Java Angle Difference angleDiff(int angle1, int angle2)

Here you can find the source of angleDiff(int angle1, int angle2)

Description

angle Diff

License

Apache License

Declaration

public static double angleDiff(int angle1, int angle2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double angleDiff(int angle1, int angle2) {
        double diff = Math.abs(angle1 - angle2);
        if (diff <= 180) {
            return diff;
        } else {//from   w  w w . j a  v  a  2 s .c  om
            return 360 - diff;
        }
    }
}

Related

  1. angleDiff(double alpha, double beta)
  2. angleDiff(double angle1, double angle2, boolean normalized)
  3. angleDiff(final double a1, final double a2)
  4. angleDiff(float a, float b)
  5. angleDiff(int ang1, int ang2)
  6. angleDiff360(final double angleOne, final double angleTwo)
  7. angleDiffAbs(double a, double b)
  8. angleDifference(double angle1, double angle2)
  9. angleDifference(final int alpha, final int beta)