source:
trunk/KtJet/KtUtil.cc@
2
Last change on this file since 2 was 2, checked in by , 16 years ago | |
---|---|
File size: 356 bytes |
Rev | Line | |
---|---|---|
[2] | 1 | #include "KtJet/KtUtil.h" |
2 | #include "KtJet/KtLorentzVector.h" | |
3 | #include <cmath> | |
4 | ||
5 | namespace KtJet { | |
6 | /** Put phi in range [-pi,+pi]. No such function in CLHEP 1.7. (But is in 1.8.) | |
7 | */ | |
8 | KtFloat 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.