math.h/PI integration
[wxWidgets.git] / include / wx / math.h
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 #ifndef _WX_MATH_H_
13 #define _WX_MATH_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "math.h"
17 #endif
18
19 #include "wx/defs.h"
20
21 #include <math.h>
22
23 #ifndef M_PI
24 #define M_PI 3.1415926535897932384626433832795
25 #endif
26
27 // unknown __VISAGECC__, __SYMANTECCC__
28
29 #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
30 #include <float.h>
31 #define wxFinite(x) _finite(x)
32 #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
33 defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
34 defined(__HPUX__)||defined(__MWERKS__)
35 #define wxFinite(x) finite(x)
36 #else
37 #define wxFinite(x) ((x) == (x))
38 #endif
39
40
41 #if defined(__VISUALC__)||defined(__BORLAND__)
42 #define wxIsNaN(x) _isnan(x)
43 #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
44 defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
45 defined(__HPUX__)||defined(__MWERKS__)
46 #define wxIsNaN(x) isnan(x)
47 #else
48 #define wxIsNaN(x) ((x) != (x))
49 #endif
50
51
52 #endif // _WX_MATH_H_