refactor getCurrentAngle