mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 05:27:48 +00:00
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
This commit is contained in:
@@ -211,6 +211,36 @@ SDL_sqrt(double x)
|
||||
#endif
|
||||
}
|
||||
|
||||
float
|
||||
SDL_sqrtf(float x)
|
||||
{
|
||||
#if defined(HAVE_SQRTF)
|
||||
return sqrtf(x);
|
||||
#else
|
||||
return (float)SDL_sqrt((double)x);
|
||||
#endif
|
||||
}
|
||||
|
||||
double
|
||||
SDL_tan(double x)
|
||||
{
|
||||
#if defined(HAVE_TAN)
|
||||
return tan(x);
|
||||
#else
|
||||
return SDL_uclibc_tan(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
float
|
||||
SDL_tanf(float x)
|
||||
{
|
||||
#if defined(HAVE_TANF)
|
||||
return tanf(x);
|
||||
#else
|
||||
return (float)SDL_tan((double)x);
|
||||
#endif
|
||||
}
|
||||
|
||||
int SDL_abs(int x)
|
||||
{
|
||||
#ifdef HAVE_ABS
|
||||
|
||||
Reference in New Issue
Block a user