def closer_ang(x,a,dir=0):
    if dir == 0:
        return a + smaller_ang(x-a)
    elif dir == 1:
        return a + (x-a)%(2*pi)
    elif dir == -1:
        return a + (x-a)%(2*pi) - 2*pi
find angle y (==x mod 2*pi) that is close to a                             
dataset/ETHPy150Open rll/lfd/lfd/rapprentice/kinematics_utils.py/closer_ang