OLD | NEW |
(Empty) | |
| 1 /* ----------------------------------------------------------------------------- |
| 2 * See the LICENSE file for information on copyright, usage and redistribution |
| 3 * of SWIG, and the README file for authors - http://www.swig.org/release.html. |
| 4 * |
| 5 * math.i |
| 6 * |
| 7 * SWIG library file for floating point operations. |
| 8 * -----------------------------------------------------------------------------
*/ |
| 9 |
| 10 %module math |
| 11 %{ |
| 12 #include <math.h> |
| 13 %} |
| 14 |
| 15 extern double cos(double x); |
| 16 /* Cosine of x */ |
| 17 |
| 18 extern double sin(double x); |
| 19 /* Sine of x */ |
| 20 |
| 21 extern double tan(double x); |
| 22 /* Tangent of x */ |
| 23 |
| 24 extern double acos(double x); |
| 25 /* Inverse cosine in range [-PI/2,PI/2], x in [-1,1]. */ |
| 26 |
| 27 extern double asin(double x); |
| 28 /* Inverse sine in range [0,PI], x in [-1,1]. */ |
| 29 |
| 30 extern double atan(double x); |
| 31 /* Inverse tangent in range [-PI/2,PI/2]. */ |
| 32 |
| 33 extern double atan2(double y, double x); |
| 34 /* Inverse tangent of y/x in range [-PI,PI]. */ |
| 35 |
| 36 extern double cosh(double x); |
| 37 /* Hyperbolic cosine of x */ |
| 38 |
| 39 extern double sinh(double x); |
| 40 /* Hyperbolic sine of x */ |
| 41 |
| 42 extern double tanh(double x); |
| 43 /* Hyperbolic tangent of x */ |
| 44 |
| 45 extern double exp(double x); |
| 46 /* Natural exponential function e^x */ |
| 47 |
| 48 extern double log(double x); |
| 49 /* Natural logarithm ln(x), x > 0 */ |
| 50 |
| 51 extern double log10(double x); |
| 52 /* Base 10 logarithm, x > 0 */ |
| 53 |
| 54 extern double pow(double x, double y); |
| 55 /* Power function x^y. */ |
| 56 |
| 57 extern double sqrt(double x); |
| 58 /* Square root. x >= 0 */ |
| 59 |
| 60 extern double fabs(double x); |
| 61 /* Absolute value of x */ |
| 62 |
| 63 extern double ceil(double x); |
| 64 /* Smallest integer not less than x, as a double */ |
| 65 |
| 66 extern double floor(double x); |
| 67 /* Largest integer not greater than x, as a double */ |
| 68 |
| 69 extern double fmod(double x, double y); |
| 70 /* Floating-point remainder of x/y, with the same sign as x. */ |
| 71 |
| 72 #define M_E 2.7182818284590452354 |
| 73 #define M_LOG2E 1.4426950408889634074 |
| 74 #define M_LOG10E 0.43429448190325182765 |
| 75 #define M_LN2 0.69314718055994530942 |
| 76 #define M_LN10 2.30258509299404568402 |
| 77 #define M_PI 3.14159265358979323846 |
| 78 #define M_PI_2 1.57079632679489661923 |
| 79 #define M_PI_4 0.78539816339744830962 |
| 80 #define M_1_PI 0.31830988618379067154 |
| 81 #define M_2_PI 0.63661977236758134308 |
| 82 #define M_2_SQRTPI 1.12837916709551257390 |
| 83 #define M_SQRT2 1.41421356237309504880 |
| 84 #define M_SQRT1_2 0.70710678118654752440 |
| 85 |
OLD | NEW |