def METHOD_NAME(length, r):
    if length < -0.8*r:
        return np.pi
    if length > 0.9*r:
        return 0
    if length < 0:
        return np.pi-np.arccos((-1*length)/r)
    return np.arccos(length/r)