Java Angle angleRadToDegClipped(final double angleRad)

Here you can find the source of angleRadToDegClipped(final double angleRad)

Description

angle Rad To Deg Clipped

License

Open Source License

Declaration

public static int angleRadToDegClipped(final double angleRad) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int angleRadToDegClipped(final double angleRad) {
        final int degUnclipped = (int) (Math.toDegrees(angleRad) + 0.5);
        // Make sure return value is in [0, 360) as required by game engine.
        return ((degUnclipped % 360) + 360) % 360;
    }/*from www.j  av  a 2s.c om*/
}

Related

  1. angleInRange(double angle, double min, double max)
  2. angleInRange(float theta1, float theta2, float tolerance)
  3. angleLinear(float a, float b, int spin, float f)
  4. angleOfLine(int x1, int y1, int x2, int y2)
  5. angleOfLineDeg(double x1, double y1, double x2, double y2)
  6. anglesInvalid(double sza, double vza, double saa, double vaa)
  7. angleSum(float a1, float a2)
  8. angleTo(final int x, final int y, final int thatx, final int thaty)
  9. angleToCompass(double angleIn)