ATLAS Offline Software
Loading...
Searching...
No Matches
python.normphi Namespace Reference

Functions

 normphi (phi)

Function Documentation

◆ normphi()

python.normphi.normphi ( phi)
Normalize an angle to within the range -pi...pi.

This is intended for use only when the initial angle is already
close to being within the range.

Definition at line 15 of file normphi.py.

15def normphi (phi):
16 """Normalize an angle to within the range -pi...pi.
17
18This is intended for use only when the initial angle is already
19close to being within the range.
20"""
21
22 while phi < -pi:
23 phi += 2*pi
24 while phi > pi:
25 phi -= 2*pi
26 return phi
27
28