Removed SDL_stdinc.h dependency on HAVE_M_PI, added SDL_M_PIl (double) and SDL_M_PIf (float) instead

This commit is contained in:
Sam Lantinga committed 2022-11-25 10:33:37 -08:00
1 parent 8733927e35
commit 670f1df469
16 files changed
+38 -44

No files matched your search

+4 -4
View File
@@ -79,12 +79,12 @@ SDL_acos(double val)
#else
double result;
if (val == -1.0) {
result = M_PI;
result = SDL_M_PIl;
} else {
result = SDL_atan(SDL_sqrt(1.0 - val * val) / val);
if (result < 0.0)
{
result += M_PI;
result += SDL_M_PIl;
}
}
return result;
@@ -109,9 +109,9 @@ SDL_asin(double val)
#else
double result;
if (val == -1.0) {
result = -(M_PI / 2.0);
result = -(SDL_M_PIl / 2.0);
} else {
result = (M_PI / 2.0) - SDL_acos(val);
result = (SDL_M_PIl / 2.0) - SDL_acos(val);
}
return result;
#endif