]> git.saurik.com Git - wxWidgets.git/blob - include/wx/math.h
VC++ 5 compatibility
[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 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 #ifndef _WX_MATH_H_
15 #define _WX_MATH_H_
16
17 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
18 #pragma interface "math.h"
19 #endif
20
21 #include "wx/defs.h"
22
23 #include <math.h>
24
25 #ifndef M_PI
26 #define M_PI 3.1415926535897932384626433832795
27 #endif
28
29 /* unknown __VISAGECC__, __SYMANTECCC__ */
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__)|| \
36 defined(__HPUX__)||defined(__MWERKS__)
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__)|| \
47 defined(__HPUX__)||defined(__MWERKS__)
48 #define wxIsNaN(x) isnan(x)
49 #else
50 #define wxIsNaN(x) ((x) != (x))
51 #endif
52
53
54 #endif
55 /* _WX_MATH_H_ */