ATLAS Offline Software
Functions
python.normphi Namespace Reference

Functions

def normphi (phi)
 

Function Documentation

◆ normphi()

def 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.

15 def normphi (phi):
16  """Normalize an angle to within the range -pi...pi.
17 
18 This is intended for use only when the initial angle is already
19 close 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 
python.normphi.normphi
def normphi(phi)
Definition: normphi.py:15