From c77c58ce6b718dd2cd1886900b8d4aa420bf0111 Mon Sep 17 00:00:00 2001 From: Jing Li Date: Wed, 16 Nov 2022 17:45:44 +0800 Subject: [PATCH] Update --- app/Services/LinkosDeviceLogService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/LinkosDeviceLogService.php b/app/Services/LinkosDeviceLogService.php index e86a8a5..2ac1074 100644 --- a/app/Services/LinkosDeviceLogService.php +++ b/app/Services/LinkosDeviceLogService.php @@ -449,7 +449,7 @@ class LinkosDeviceLogService $y += cos($radian); } - $degree = round(rad2deg(atan($x / $y))); + $degree = round(rad2deg(atan2($y, $x))); if (($x > 0 || $x < 0) && $y < 0) { $degree += 180;