def fixAngle02Pi(a):
    """
    A is an angle in radians;  return an equivalent angle between 0 
    and 2 pi
    """
    pi2 = 2.0* math.pi
    while a < 0 or a > pi2: 
        if a < 0:
            a = a + pi2
        elif a > pi2:
            a = a - pi2
    return a
dataset/ETHPy150Open rll/lfd/lfd/rapprentice/util.py/fixAngle02Pi/original