src/utils/common.js
@@ -20,7 +20,7 @@ } export const rotationParseNum = (num) => { const normalizedDegrees = num % 360; const normalizedDegrees = positiveAngle(num); return normalizedDegrees * Math.PI / 180; } @@ -28,6 +28,10 @@ return (targetTheta - originTheta > 180) ? targetTheta - 360 : targetTheta; } export const positiveAngle = (angle) => { return ((angle % 360) + 360) % 360; } export const normalizeAngle = (angle) => { let newAngle = angle % 360;