This function calculate the sinus of an angle in radian.
double dg_sin(double x);
double dg_sin(PI/2);
double dg_sin(double x)
{
double result;
long int factorial = 1;
int value = 1;
x = dg_get_radian(x);
result = x;
for (int i = 3; i <= PRECISION; i += 2) {
factorial *= (i - 1) * i;
value *= -1;
result += value * ((double)(1)/factorial) * dg_fpow(x, i);
}
return result;
}