mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
stdlib: An implementation of SDL_scalbn using ldexp() (thanks, Ozkan!).
Fixes Bugzilla #3767.
This commit is contained in:
parent
a0cd7d6bce
commit
620f5342b5
@ -187,6 +187,10 @@ SDL_scalbn(double x, int n)
|
|||||||
return scalbn(x, n);
|
return scalbn(x, n);
|
||||||
#elif defined(HAVE__SCALB)
|
#elif defined(HAVE__SCALB)
|
||||||
return _scalb(x, n);
|
return _scalb(x, n);
|
||||||
|
#elif defined(HAVE_LIBC) && defined(HAVE_FLOAT_H) && (FLT_RADIX == 2)
|
||||||
|
/* from scalbn(3): If FLT_RADIX equals 2 (which is
|
||||||
|
* usual), then scalbn() is equivalent to ldexp(3). */
|
||||||
|
return ldexp(x, n);
|
||||||
#else
|
#else
|
||||||
return SDL_uclibc_scalbn(x, n);
|
return SDL_uclibc_scalbn(x, n);
|
||||||
#endif /* HAVE_SCALBN */
|
#endif /* HAVE_SCALBN */
|
||||||
|
Loading…
Reference in New Issue
Block a user