This commit is contained in:
Sunch 2026-11-11 22:15:00 +08:00
parent bccbe88f87
commit 2dbeda3c90

View file

@ -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{