2 /* Copyright (C) 2007 Christian Holm Christensen <cholm@nbi.dk>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 #ifndef ALIFMDFLOWUTIL_H
20 #define ALIFMDFLOWUTIL_H
23 # define M_PI 3.14159265358979323846264338327
26 /** @defgroup u_utils Utilities
27 @brief Group of utility classes and functions
30 //__________________________________________________________________
31 /** Normalize the angle @a ang to the interval @f$ [0,2\pi)@f$
33 @param ang Angle to normalize
34 @return the normalised angle */
36 NormalizeAngle(Double_t ang)
38 while (ang < 0) ang += 2 * M_PI;
39 while (ang >= 2*M_PI) ang -= 2 * M_PI;
44 //____________________________________________________________________