From 24297a5f1d5317d523b9b8642a7b8485445a9940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Janu=CC=8A?= Date: Thu, 16 May 2024 14:06:21 +0200 Subject: [PATCH] CS --- src/GpsPoint.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/GpsPoint.php b/src/GpsPoint.php index 8df2d31..ce398fa 100644 --- a/src/GpsPoint.php +++ b/src/GpsPoint.php @@ -150,11 +150,10 @@ public function distanceTo(self $point, string $google_api_key = null): float } /** - * @author Jakub Vrána + * Author Jakub Vrána * @link https://php.vrana.cz/vzdalenost-dvou-zemepisnych-bodu.php */ - return - acos(cos(deg2rad($this->lat)) * cos(deg2rad($this->lng)) * cos(deg2rad($point->lat)) * cos(deg2rad($point->lng)) + cos(deg2rad($this->lat)) * sin(deg2rad($this->lng)) * cos(deg2rad($point->lat)) * sin(deg2rad($point->lng)) + sin(deg2rad($this->lat)) * sin(deg2rad($point->lat))) + return acos(cos(deg2rad($this->lat)) * cos(deg2rad($this->lng)) * cos(deg2rad($point->lat)) * cos(deg2rad($point->lng)) + cos(deg2rad($this->lat)) * sin(deg2rad($this->lng)) * cos(deg2rad($point->lat)) * sin(deg2rad($point->lng)) + sin(deg2rad($this->lat)) * sin(deg2rad($point->lat))) * 6372.795 // Great circle radius * 1000; // km to m }