made the interpolation more robust by treating the negative angles