From 81f7169cb836f0ea1c41877f3b32849786b00e8c Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Thu, 16 Apr 2026 17:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=92=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/tool.js b/src/utils/tool.js index 8cb377c..dd4dfd1 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -37,8 +37,8 @@ function calcRectangleFromPoints(points) { const bottomAngleRad = Math.atan2(p1.y - p4.y, p1.x - p4.x); const leftAngleRad = Math.atan2(p1.x - p2.x, p1.y - p2.y); - const angleDeg = bottomAngleRad * 180 / Math.PI; - console.log(leftAngleRad * 180 / Math.PI) + const angleDeg = leftAngleRad * 180 / Math.PI - bottomAngleRad * 180 / Math.PI; + console.log(angleDeg) return { width: Number(width.toFixed(2)), height: Number(height.toFixed(2)), angle: Number(angleDeg.toFixed(6)) };