@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | string $unit = 'K' |
25 | 25 | ) { |
26 | 26 | $theta = $lon1 - $lon2; |
27 | - $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); |
|
27 | + $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); |
|
28 | 28 | $dist = acos($dist); |
29 | 29 | $dist = rad2deg($dist); |
30 | 30 | $miles = $dist * 60 * 1.1515; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $x_quotient = $squares / 2; |
58 | 58 | $y_quotient = $x_quotient / 2; |
59 | 59 | |
60 | - if (0 !== $remainder ) { |
|
60 | + if (0 !== $remainder) { |
|
61 | 61 | throw new \Exception('geoHash divisions must be multiple of 2'); |
62 | 62 | } |
63 | 63 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $y_precision = 12; |
122 | 122 | foreach ($height_precision as $key => $value) { |
123 | - if ($height> $value) { |
|
123 | + if ($height > $value) { |
|
124 | 124 | $y_precision = $key; |
125 | 125 | break; |
126 | 126 | } |