00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __robomath__
00010 #define __robomath__
00011
00012 #define POWER(x) ((x)*(x))
00013 #define DEGREES(a) ((a)*180.0/M_PI)
00014 #define DEG2RAD(a) ((a)/180.0*M_PI)
00015 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
00016 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
00017
00021 double gaussrand();
00022 float urand();
00023 double gaussian_random(void);
00024 double evaluate_gaussian(double val, double sigma);
00025 float exprand(float lambda);
00026
00027 #endif