source: trunk/KtJet/KtUtil.cc@ 12

Last change on this file since 12 was 2, checked in by Pavel Demin, 16 years ago

first commit

File size: 356 bytes
RevLine 
[2]1#include "KtJet/KtUtil.h"
2#include "KtJet/KtLorentzVector.h"
3#include <cmath>
4
5namespace KtJet {
6 /** Put phi in range [-pi,+pi]. No such function in CLHEP 1.7. (But is in 1.8.)
7 */
8KtFloat phiAngle(KtFloat testphi) {
9 KtFloat phi = testphi;
10 while (phi>M_PI) phi -= (2*M_PI);
11 while (phi<-M_PI) phi += (2*M_PI);
12 return phi;
13}
14
15}//end of namespace
Note: See TracBrowser for help on using the repository browser.