MAPG-3 move utils classes into Util namespace

This commit is contained in:
bence committed 2020-05-17 22:26:23 +02:00
1 parent a61d2951d7
commit d5c0e59d29
2 files changed
+2 -2

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
<?php namespace MapGuesser\Util\Geo;
class Position
{
private float $lat;
private float $lng;
public function __construct(float $lat, float $lng)
{
$this->lat = $lat;
$this->lng = $lng;
}
public function getLat(): float
{
return $this->lat;
}
public function getLng(): float
{
return $this->lng;
}
public function toJson(): string
{
return json_encode([
'lat' => $this->lat,
'lng' => $this->lng,
]);
}
}