Added SDL_fmod() and SDL_fmodf()

This commit is contained in:
Sam Lantinga
2017-11-04 17:35:03 -07:00
parent 6cf065753c
commit bcdf8b916b
20 changed files with 349 additions and 88 deletions

View File

@@ -148,7 +148,7 @@ SDL_ceilf(float x)
#if defined(HAVE_CEILF)
return ceilf(x);
#else
return (float)ceil((float)x);
return (float)SDL_ceil((float)x);
#endif
}
@@ -240,6 +240,26 @@ SDL_floorf(float x)
#endif
}
double
SDL_fmod(double x, double y)
{
#if defined(HAVE_FMOD)
return fmod(x, y);
#else
return SDL_uclibc_fmod(x, y);
#endif
}
float
SDL_fmodf(float x, float y)
{
#if defined(HAVE_FMODF)
return fmodf(x, y);
#else
return (float)SDL_fmod((double)x, (double)y);
#endif
}
double
SDL_log(double x)
{