added wx/math.h (patch 686009)
[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(__APPLE__)
16 #pragma interface "math.h"
17 #endif
18
19 #include "wx/defs.h"
20
21 // unknown __VISAGECC__, __SYMANTECCC__
22
23 #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
24 #include <float.h>
25 #define wxFinite(x) _finite(x)
26 #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
27 defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
28 defined(__HPUX__)||defined(__MWERKS__)
29 #define wxFinite(x) finite(x)
30 #else
31 #define wxFinite(x) ((x) == (x))
32 #endif
33
34
35 #if defined(__VISUALC__)||defined(__BORLAND__)
36 #define wxIsNaN(x) _isnan(x)
37 #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
38 defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
39 defined(__HPUX__)||defined(__MWERKS__)
40 #define wxIsNaN(x) isnan(x)
41 #else
42 #define wxIsNaN(x) ((x) != (x))
43 #endif
44
45
46 #endif // _WX_MATH_H_