src/utils/common.js
@@ -28,6 +28,14 @@ return (targetTheta - originTheta > 180) ? targetTheta - 360 : targetTheta; } export const normalizeAngle = (angle) => { let newAngle = angle % 360; if (newAngle < 0) { newAngle += 360; } return newAngle; } export const calculateMappedPosition = (realPos) => { return [ realPos[0] * REAL_COMPARE_MAP_SCALE + REAL_COMPARE_MAP_OFFSET_X,