From c89f7bde68710a6c16403f7436382f61abcf75f4 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Sat, 7 Oct 2023 14:47:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=96=B9=E5=90=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/train/Train.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/train/Train.ts b/src/graphics/train/Train.ts index 47e195f..567a956 100644 --- a/src/graphics/train/Train.ts +++ b/src/graphics/train/Train.ts @@ -419,7 +419,7 @@ export class Train extends JlGraphic { const py = startP.y + Math.round(offset * (endP.y - startP.y)); let angle = Math.atan2(endP.y - startP.y, endP.x - startP.x); if (-Math.PI / 2 > angle) { - angle = angle + Math.PI; + angle = -(angle + Math.PI); } if (Math.PI / 2 <= angle) { angle = angle - Math.PI;