Java Degree to Radian toRadians(double degrees)

Here you can find the source of toRadians(double degrees)

Description

to Radians

License

Open Source License

Declaration

public static double toRadians(double degrees) 

Method Source Code

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

public class Main {
    public static double toRadians(double degrees) {
        return Math.toRadians(wind(degrees, 360));
    }//from   w w w.  j ava2  s. co  m

    /**
     * Wind the given number into the interval [0, intervalEndExclusive)
     * @param d
     * @param intervalEndExclusive
     * @return
     */
    public static double wind(double d, double intervalEndExclusive) {
        return d - intervalEndExclusive * (Math.floor(d / intervalEndExclusive));
    }
}

Related

  1. degToRad(final double deg)
  2. degToRad(final float deg)
  3. degToRad(float deg)
  4. toRadians(double angleDegrees)
  5. toRadians(double degrees)
  6. toRadians(float degrees)