From 2dbeda3c90a5c41741e2ad74a789c02d3157e3a5 Mon Sep 17 00:00:00 2001 From: Sunch <120295462+Sunch233@users.noreply.github.com> Date: Wed, 11 Nov 2026 22:15:00 +0800 Subject: [PATCH] ... --- src/utils/Utils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 8215e5db..ca49fda6 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -458,7 +458,8 @@ class Utils{ } public static function rotDegreesToChar(float $deg) : int{ - return ((int)(($deg / 360.0) * 256.0)) & 0xFF; + $v = ((int)(($deg / 360.0) * 256.0)) & 0xFF; + return $v >= 128 ? $v - 256 : $v; } public static function rotCharToDegrees(int $char) : float{