]>
Commit | Line | Data |
---|---|---|
83c5e934 WS |
1 | /** |
2 | * Name: math.h | |
3 | * Purpose: Declarations/definitions of common math functions | |
4 | * Author: John Labenski and others | |
5 | * Modified by: | |
6 | * Created: 02/02/03 | |
7 | * RCS-ID: | |
8 | * Copyright: (c) | |
9 | * Licence: wxWindows licence | |
10 | */ | |
11 | ||
12 | /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ | |
a02afd14 VZ |
13 | |
14 | #ifndef _WX_MATH_H_ | |
15 | #define _WX_MATH_H_ | |
16 | ||
12028905 | 17 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
a02afd14 VZ |
18 | #pragma interface "math.h" |
19 | #endif | |
20 | ||
21 | #include "wx/defs.h" | |
22 | ||
19edb09c WS |
23 | #include <math.h> |
24 | ||
25 | #ifndef M_PI | |
26 | #define M_PI 3.1415926535897932384626433832795 | |
27 | #endif | |
28 | ||
83c5e934 | 29 | /* unknown __VISAGECC__, __SYMANTECCC__ */ |
a02afd14 VZ |
30 | |
31 | #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) | |
32 | #include <float.h> | |
33 | #define wxFinite(x) _finite(x) | |
34 | #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ | |
35 | defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ | |
4e32eea1 | 36 | defined(__HPUX__)||defined(__MWERKS__) |
a02afd14 VZ |
37 | #define wxFinite(x) finite(x) |
38 | #else | |
39 | #define wxFinite(x) ((x) == (x)) | |
40 | #endif | |
41 | ||
42 | ||
43 | #if defined(__VISUALC__)||defined(__BORLAND__) | |
44 | #define wxIsNaN(x) _isnan(x) | |
45 | #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ | |
46 | defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ | |
4e32eea1 WS |
47 | defined(__HPUX__)||defined(__MWERKS__) |
48 | #define wxIsNaN(x) isnan(x) | |
a02afd14 VZ |
49 | #else |
50 | #define wxIsNaN(x) ((x) != (x)) | |
51 | #endif | |
52 | ||
53 | ||
83c5e934 WS |
54 | #endif |
55 | /* _WX_MATH_H_ */ |