Skip to content
Permalink
Browse files

Hook up SDL_acos and SDL_asin properly.

  • Loading branch information
icculus committed Dec 9, 2013
1 parent 5e656f8 commit d01ad02be728fb7f934924157138c4dbc2bb1d77

File 11 of 12 in d01ad02

@@ -113,28 +113,3 @@ double atan(double x)
}
libm_hidden_def(atan)

double SDL_acos(double val)
{
double result;
if (val == -1.0) {
result = M_PI;
} else {
result = SDL_atan(SDL_sqrt(1.0 - val * val) / val);
if (result < 0.0)
{
result += M_PI;
}
}
return result;
}

double SDL_asin(double val)
{
double result;
if (val == -1.0) {
result = -(M_PI / 2.0);
} else {
result = (M_PI / 2.0) - SDL_acos(val);
}
return result;
}

0 comments on commit d01ad02

Please sign in to comment.