Dear experts,
The implementation in root.cern.ch/root/html/src/TVector2.cxx.html#66 :
return TMath::Pi()+TMath::ATan2(-fY,-fX);
I wonder why we don’t return TMath::ATan2( fY, fX) directly ?
Thanks,
Jike
Dear experts,
The implementation in root.cern.ch/root/html/src/TVector2.cxx.html#66 :
return TMath::Pi()+TMath::ATan2(-fY,-fX);
I wonder why we don’t return TMath::ATan2( fY, fX) directly ?
Thanks,
Jike
HI
You are right, one could return directly TMath::ATan2( fY, fX)
Lorenzo
Hi Lorenzo,
If so why put such a confusing implementation there …
Cheers,
Jike
[quote=“moneta”]HI
You are right, one could return directly TMath::ATan2( fY, fX)
Lorenzo[/quote]
This is very old code and I don’t know who implemented.
I can just say that the new version of Geometry vectors (Math/GenVector/Cartesian2D.h) implements Phi() in the simpler way as you have suggested
Lorenzo
Oh, I see. Thanks!
Cheers,
Jike
[quote=“moneta”]This is very old code and I don’t know who implemented.
I can just say that the new version of Geometry vectors (Math/GenVector/Cartesian2D.h) implements Phi() in the simpler way as you have suggested
Lorenzo[/quote]