]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/swig_lib/math.i
Patch [ 588732 ] makes wxRB_GROUP/radiobuttons working
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / math.i
1 //
2 // $Header$
3 //
4 // math.i
5 // Dave Beazley
6 // March 24, 1996
7 // SWIG file for floating point operations
8 //
9 /* Revision history
10 * $Log$
11 * Revision 1.1 2002/04/29 19:56:49 RD
12 * Since I have made several changes to SWIG over the years to accomodate
13 * special cases and other things in wxPython, and since I plan on making
14 * several more, I've decided to put the SWIG sources in wxPython's CVS
15 * instead of relying on maintaining patches. This effectivly becomes a
16 * fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
17 * doesn't have some things I rely on in 1.1, not to mention that my
18 * custom patches would all have to be redone, I felt that this is the
19 * easier road to take.
20 *
21 * Revision 1.1.1.1 1999/02/28 02:00:53 beazley
22 * Swig1.1
23 *
24 * Revision 1.1 1996/05/22 17:27:01 beazley
25 * Initial revision
26 *
27 */
28
29 %module math
30 %{
31 #include <math.h>
32 %}
33
34 %section "SWIG Math Module",after,info,nosort,pre,chop_left=3,chop_bottom=0,chop_top=0,chop_right=0,skip=1
35
36 %text %{
37 %include math.i
38
39 This module provides access to the C math library and contains most
40 of the functions in <math.h>. Most scripting languages already provide
41 math support, but in certain cases, this module can provide more
42 direct access.
43 %}
44
45 %subsection "Functions"
46
47
48 extern double cos(double x);
49 /* Cosine of x */
50
51 extern double sin(double x);
52 /* Sine of x */
53
54 extern double tan(double x);
55 /* Tangent of x */
56
57 extern double acos(double x);
58 /* Inverse cosine in range [-PI/2,PI/2], x in [-1,1]. */
59
60 extern double asin(double x);
61 /* Inverse sine in range [0,PI], x in [-1,1]. */
62
63 extern double atan(double x);
64 /* Inverse tangent in range [-PI/2,PI/2]. */
65
66 extern double atan2(double y, double x);
67 /* Inverse tangent of y/x in range [-PI,PI]. */
68
69 extern double cosh(double x);
70 /* Hyperbolic cosine of x */
71
72 extern double sinh(double x);
73 /* Hyperbolic sine of x */
74
75 extern double tanh(double x);
76 /* Hyperbolic tangent of x */
77
78 extern double exp(double x);
79 /* Natural exponential function e^x */
80
81 extern double log(double x);
82 /* Natural logarithm ln(x), x > 0 */
83
84 extern double log10(double x);
85 /* Base 10 logarithm, x > 0 */
86
87 extern double pow(double x, double y);
88 /* Power function x^y. */
89
90 extern double sqrt(double x);
91 /* Square root. x >= 0 */
92
93 extern double fabs(double x);
94 /* Absolute value of x */
95
96 extern double ceil(double x);
97 /* Smallest integer not less than x, as a double */
98
99 extern double floor(double x);
100 /* Largest integer not greater than x, as a double */
101
102 extern double fmod(double x, double y);
103 /* Floating-point remainder of x/y, with the same sign as x. */
104
105 %subsection "Mathematical constants",noinfo
106
107 #define M_E 2.7182818284590452354
108 #define M_LOG2E 1.4426950408889634074
109 #define M_LOG10E 0.43429448190325182765
110 #define M_LN2 0.69314718055994530942
111 #define M_LN10 2.30258509299404568402
112 #define M_PI 3.14159265358979323846
113 #define M_PI_2 1.57079632679489661923
114 #define M_PI_4 0.78539816339744830962
115 #define M_1_PI 0.31830988618379067154
116 #define M_2_PI 0.63661977236758134308
117 #define M_2_SQRTPI 1.12837916709551257390
118 #define M_SQRT2 1.41421356237309504880
119 #define M_SQRT1_2 0.70710678118654752440
120