Mercurial > sdl-ios-xcode
annotate src/libm/math.h @ 4866:f42e8db53f78
Added a typedef for the thread function to simplify documentation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 28 Aug 2010 22:56:52 -0700 |
parents | f7b03b6838cb |
children | d275c95ddc05 |
rev | line source |
---|---|
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
3697 | 3 Copyright (C) 1997-2010 Sam Lantinga |
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 #include "SDL_config.h" |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
23 #include "SDL_stdinc.h" |
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 |
2760
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2759
diff
changeset
|
25 /* Math routines from uClibc: http://www.uclibc.org */ |
02aa80d7905f
Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents:
2759
diff
changeset
|
26 |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
27 #ifdef HAVE_COPYSIGN |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
28 #define copysign SDL_uclibc_copysign |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
29 #else |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
30 #define copysign SDL_copysign |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
31 #endif |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
32 |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
33 #ifdef HAVE_COS |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
34 #define cos SDL_uclibc_cos |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
35 #else |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
36 #define cos SDL_cos |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
37 #endif |
2769
2a46b5912665
Added missing math.h functionality for SDL_audiocvt.c
Sam Lantinga <slouken@libsdl.org>
parents:
2768
diff
changeset
|
38 |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
39 #ifdef HAVE_FABS |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
40 #define fabs SDL_uclibc_fabs |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
41 #else |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
42 #define fabs SDL_fabs |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
43 #endif |
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
45 #ifdef HAVE_FLOOR |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
46 #define floor SDL_uclibc_floor |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
47 #else |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
48 #define floor SDL_floor |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
49 #endif |
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
51 #ifndef HAVE_LOG |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
52 #define __ieee754_log SDL_log |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
53 #endif |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
54 |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
55 #ifndef HAVE_POW |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
56 #define __ieee754_pow SDL_pow |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
57 #endif |
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
59 #ifdef HAVE_SCALBN |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
60 #define scalbn SDL_uclibc_scalbn |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
61 #else |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
62 #define scalbn SDL_scalbn |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
63 #endif |
2769
2a46b5912665
Added missing math.h functionality for SDL_audiocvt.c
Sam Lantinga <slouken@libsdl.org>
parents:
2768
diff
changeset
|
64 |
3012
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
65 #ifdef HAVE_SIN |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
66 #define sin SDL_uclibc_sin |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
67 #else |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
68 #define sin SDL_sin |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
69 #endif |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
70 |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
71 #ifndef HAVE_SQRT |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
72 #define __ieee754_sqrt SDL_sqrt |
7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
73 #endif |
2756
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 |
a98604b691c8
Expanded the libm support and put it into a separate directory.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
75 /* vi: set ts=4 sw=4 expandtab: */ |