#
luxiaotao1123
2024-05-15 b8bac27bcc895b540bae4c130a3c59d289736081
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;