Here you can find the source of sin(float angle)
public static float sin(float angle)
//package com.java2s; //License from project: Open Source License public class Main { private final static int accuracy_level = 65536; private static float[] sin_table = new float[accuracy_level]; private final static float PI = (float) Math.PI; public static float sin(float angle) { float angle1 = angle % (2 * PI); if (angle1 < 0) { angle1 += 2 * PI;// w w w .j ava2 s.co m } return sin_table[(int) (angle1 * accuracy_level / 2 / PI)]; } }