List of utility methods to do cos
double | cos(double a) Returns the trigonometric cosine of an angle. return Math.cos(a);
|
double | cos(double anAngle) Returns the cos of the given angle in degrees. return Math.cos(Math.toRadians(anAngle));
|
double | cos(double d) cos return SIN_TABLE[(int) ((float) d * 10430.378F + 16384.0F) & 65535]; |
double | cos(double radians) Get the cosine of an angle return sin(radians + Math.PI / 2);
|
double | cos(double[] v1, double[] v2) cos double s = 0; s = multiple(v1, v2); double a = Math.pow(multiple(v1, v1) * multiple(v2, v2), 0.5); return s / a; |
double | cos(double[] v1, double[] v2) cos double s = 0; s = Math.abs(multiple(v1, v2)); double a = Math.pow(multiple(v1, v1) * multiple(v2, v2), 0.5); if (a == 0) { return -1.0; return s / a; |
double | cos(final double value) cos final int temp; if (value > 0) { if ((int) value > 360d) { if ((temp = ((int) value - ((int) (value / 360d)) * 360)) != 0) { return (double) COS_TABLE[temp]; } else { return (double) COS_TABLE[360]; } else { return (double) COS_TABLE[(int) (value)]; } else if ((-(int) value) > 360d) { if ((temp = (-((int) value - ((int) (value / 360d)) * 360))) != 0) { return (double) COS_TABLE[temp]; } else { return (double) COS_TABLE[360]; } else { return (double) COS_TABLE[-(int) (value)]; |
float | cos(final float angle) Faster cos method using special cache, based on Mojang code. return sinCache[((int) ((angle * UNKNOWN_CONST) + ((SIN_CACHE_SIZE + 1) / 4)) & SIN_CACHE_SIZE)]; |
float | cos(final float value) cos looked up in the sin table with the appropriate offset return SIN_TABLE[(int) (value * 10430.378F + 16384.0F) & 65535]; |
float | cos(float angle) cos return (float) Math.cos(angle); |