+
+ _getShortestEndDegree: function (startDegrees, endDegrees) {
+ var turnAngle = Math.abs(endDegrees - startDegrees);
+ var turnAnglePositive = (endDegrees - startDegrees) >= 0;
+ if (turnAngle <= 180) return endDegrees;
+ var result = startDegrees + (360 - turnAngle) * (turnAnglePositive ? -1 : 1);
+ return result;
+ },