00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifdef fl_math_h_cyclic_include
00022 # include "/usr/include/math.h"
00023 #endif
00024
00025 #ifndef fl_math_h
00026 # define fl_math_h
00027
00028 # define fl_math_h_cyclic_include
00029 # include <math.h>
00030 # undef fl_math_h_cyclic_include
00031
00032 # ifdef __EMX__
00033 # include <float.h>
00034 # endif
00035
00036
00037 # ifndef M_PI
00038 # define M_PI 3.14159265358979323846
00039 # define M_PI_2 1.57079632679489661923
00040 # define M_PI_4 0.78539816339744830962
00041 # define M_1_PI 0.31830988618379067154
00042 # define M_2_PI 0.63661977236758134308
00043 # endif // !M_PI
00044
00045 # ifndef M_SQRT2
00046 # define M_SQRT2 1.41421356237309504880
00047 # define M_SQRT1_2 0.70710678118654752440
00048 # endif // !M_SQRT2
00049
00050 # if (defined(WIN32) || defined(CRAY)) && !defined(__MINGW32__) && !defined(__MWERKS__)
00051
00052 inline double rint(double v) {return floor(v+.5);}
00053 inline double copysign(double a, double b) {return b<0 ? -a : a;}
00054
00055 # endif // (WIN32 || CRAY) && !__MINGW32__ && !__MWERKS__
00056
00057 #endif // !fl_math_h
00058
00059
00060
00061
00062