List of utility methods to do sin
double | sin(double a) Returns the trigonometric sine of an angle. return Math.sin(a);
|
double | sin(double anAngle) Returns the sign of the given angle in degrees. return Math.sin(Math.toRadians(anAngle));
|
double | sin(double d) sin return SIN_TABLE[(int) ((float) d * 10430.378F) & 65535]; |
double | sin(double radians) Get the sine of an angle radians = reduceSinAngle(radians); if (Math.abs(radians) <= Math.PI / 4) { return Math.sin(radians); } else { return Math.cos(Math.PI / 2 - radians); |
double[] | sin(double... v) sin double[] r = new double[v.length]; for (int i = 0; i < v.length; i++) r[i] = Math.sin(v[i]); return r; |
double | sin(final double value) sin final int temp; if (value > 0) { if ((int) value > 360d) { if ((temp = ((int) value - ((int) (value / 360d)) * 360)) != 0) { return (double) SIN_TABLE[temp]; } else { return (double) SIN_TABLE[360]; } else { return (double) SIN_TABLE[(int) (value)]; } else if ((-(int) value) > 360d) { if ((temp = (-((int) value - ((int) (value / 360d)) * 360))) != 0) { return (double) SIN_TABLE[temp]; } else { return (double) SIN_TABLE[360]; } else { return (double) SIN_TABLE[-(int) (value)]; |
float | sin(final float angle) Faster sin method using special cache, based on Mojang code. return sinCache[((int) (angle * UNKNOWN_CONST) & SIN_CACHE_SIZE)]; |
float | sin(float angle) sin return (float) Math.sin(angle); |
float | sin(float angle) sin float angle1 = angle % (2 * PI); if (angle1 < 0) { angle1 += 2 * PI; return sin_table[(int) (angle1 * accuracy_level / 2 / PI)]; |
float | sin(float n) sin return sin[(int) (n * 10430.378F) & 0xffff]; |