]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/flow/AliFMDFlowUtil.h
Added code to do flow analysis.
[u/mrichter/AliRoot.git] / FMD / flow / AliFMDFlowUtil.h
1 // -*- mode: C++ -*-
2 #ifndef FLOW_UTIL_H
3 #define FLOW_UTIL_H
4 #include <cmath>
5 #ifndef M_PI
6 # define M_PI 3.14159265358979323846264338327
7 #endif
8
9 /** @defgroup u_utils Utilities 
10     @brief Group of utility classes and functions */
11 //__________________________________________________________________
12 /** Normalize the angle @a ang to the interval @f$ [0,2\pi)@f$ 
13     @ingroup u_utils
14     @param ang Angle to normalize 
15     @return the normalised angle */
16 inline Double_t 
17 NormalizeAngle(Double_t ang) 
18
19   while (ang <  0)      ang += 2 * M_PI;
20   while (ang >= 2*M_PI) ang -= 2 * M_PI;
21   return ang;
22 }
23
24 #endif
25 //____________________________________________________________________
26 //
27 // EOF
28 //
29