Java sin sinDeg(double degrees)

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

Description

sin Deg

License

Open Source License

Declaration

public static double sinDeg(double degrees) 

Method Source Code

//package com.java2s;
//License from project: GNU General Public License 

public class Main {
    private static final double SIN_TABLE_LENGTH_OVER_360 = 65536d / 360d;
    /** Pre-calculated Sin values in degrees. */
    private static double[] SIN_TABLE_DEG = new double[65536];

    public static double sinDeg(double degrees) {
        return SIN_TABLE_DEG[(int) (degrees * SIN_TABLE_LENGTH_OVER_360) & 65535];
    }/*from   w  ww  . j  a v a2 s . co m*/
}

Related

  1. sin(Short a)
  2. sin5(float x)
  3. sin_core(double x)
  4. sin_v2(double x)
  5. sind(double degreeAngle)
  6. sinDegrees(double angleInDegrees)
  7. sinf(float f)
  8. sinf(float n)