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