def angleDiff(x, y):
    twoPi = 2*math.pi
    z = (x - y)%twoPi
    if z > math.pi:
        return z - twoPi
    else:
        return z
dataset/ETHPy150Open rll/lfd/lfd/rapprentice/util.py/angleDiff/original