Java Utililty Methods sin

List of utility methods to do sin

Description

The list of methods to do sin are organized into topic(s).

Method

intsin(int angle)
sin
angle = angle % 360;
if (angle < 0) {
    angle += 360;
if (angle <= 90) {
    return sinTable[angle];
if (angle <= 180) {
...
floatsin(int angle)
sin
return sin[angle];
intsin(int f)
sin
boolean neg;
f = (f % 411774);
if (neg = f < 0)
    f = -f;
if (f < 102943) {
    ;
} else if (f < 205887) {
    f = (205887 - f);
...
floatsin(int i)
Returns the sine of i
for (; i < 0; i += 360) {
return SIN_TABLE[i];
doublesin(Number x)
sin
return Math.sin(x.doubleValue());
doublesin(Short a)
Sin.
return Math.sin(a.doubleValue());
floatsin5(float x)
5th order Taylor series approx of sin(x) only valid from about -pi < x < pi
float x2 = x * x;
return x * (x2 * x2 - 20 * x2 + 120) / 120;
doublesin_core(double x)
sicore
double x4, x2;
x2 = x * x;
x4 = x2 * x2;
return ((2.7181216275479732e-6 * x2 - 1.9839312269456257e-4) * x4
        + (8.3333293048425631e-3 * x2 - 1.6666666640797048e-1)) * x2 * x + x;
doublesin_v2(double x)
siv
double q, t;
int quadrant;
q = rint_v2(x * 6.3661977236758138e-1);
quadrant = (int) q;
t = x - q * 1.5707963267923333e+00;
t = t - q * 2.5633441515945189e-12;
if ((quadrant & 1) != 0) {
    t = cos_core(t);
...
doublesind(double degreeAngle)
sind
return Math.sin(Math.toRadians(degreeAngle));