NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globals.h
1 #ifndef GLOBS_H_
2 #define GLOBS_H_
3 
4 namespace kf_player
5 {
6  const double PI = 3.1415926535897932384626433832795;
7  const double PI2 = 1.5707963267948965579989817342721;
8  const double SPI = 1.7724538509055160272981674833411; // sqrt of pi
9  const double EPSILON = 0.000001;
10 
11  template <typename T>
12  inline T sgn(const T a) { return (a == 0 ? 0 : a < 0 ? -1 : 1); }
13  inline double picut(double x) { return x < 0 ? fmod(x-PI, 2*PI)+PI : fmod(x+PI, 2*PI)-PI;}
14  }
15 #endif /* GLOBS_H_ */