Mercurial > sdl-ios-xcode
comparison src/libm/math.h @ 2769:2a46b5912665
Added missing math.h functionality for SDL_audiocvt.c
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 12 Oct 2008 16:30:42 +0000 |
parents | 26861c61142a |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2768:26861c61142a | 2769:2a46b5912665 |
---|---|
26 #include <math.h> | 26 #include <math.h> |
27 #else | 27 #else |
28 | 28 |
29 /* Math routines from uClibc: http://www.uclibc.org */ | 29 /* Math routines from uClibc: http://www.uclibc.org */ |
30 | 30 |
31 #define M_PI 3.14159265358979323846264338327950288 /* pi */ | |
32 | |
31 extern double __ieee754_log(double x); | 33 extern double __ieee754_log(double x); |
32 extern double __ieee754_pow(double x, double y); | 34 extern double __ieee754_pow(double x, double y); |
33 extern double __ieee754_sqrt(double x); | 35 extern double __ieee754_sqrt(double x); |
34 | 36 |
35 #define log(x) __ieee754_log(x) | 37 #define log(x) __ieee754_log(x) |
41 extern double fabs(double x); | 43 extern double fabs(double x); |
42 extern double floor(double x); | 44 extern double floor(double x); |
43 extern double scalbn(double x, int n); | 45 extern double scalbn(double x, int n); |
44 extern double sin(double x); | 46 extern double sin(double x); |
45 | 47 |
48 #define sinf(x) (float)sin((double)x) | |
49 #define cosf(x) (float)cos((double)x) | |
50 | |
46 #endif /* HAVE_MATH_H */ | 51 #endif /* HAVE_MATH_H */ |
47 | 52 |
48 /* vi: set ts=4 sw=4 expandtab: */ | 53 /* vi: set ts=4 sw=4 expandtab: */ |