Java sin sin(int i)

Here you can find the source of sin(int i)

Description

Returns the sine of i

License

Open Source License

Parameter

Parameter Description
i the number, in degrees

Return

the sine of i

Declaration

public static float sin(int i) 

Method Source Code

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

public class Main {
    /**//from   w w w  .ja  v a 2s.  c om
     * Table of sine values
     *
     * @see #COS_TABLE
     */
    private static final float[] SIN_TABLE = new float[360];

    /**
     * Returns the sine of i
     *
     * @param i the number, in degrees
     * @return the sine of i
     * @see #cos(int)
     */
    public static float sin(int i) {
        for (/**/; i >= 360; i -= 360) {

        }
        for (/**/; i < 0; i += 360) {

        }
        return SIN_TABLE[i];
    }
}

Related

  1. sin(float angle)
  2. sin(float n)
  3. sin(int angle)
  4. sin(int angle)
  5. sin(int f)
  6. sin(Number x)
  7. sin(Short a)
  8. sin5(float x)
  9. sin_core(double x)