/** * Formats the coordinate with floating point numbers. * * @param integer $precision The number of required decimal places. * @return string Return format is 'Latitude, Longitude' e.g.: '-13.58470058, 52.4788904' */ public function formatDecimal(int $precision = 8) : string { $returnValue = ''; if (!$this->isValid()) { return $returnValue; } $returnValue .= $this->Latitude->formatDecimal($precision) . ', ' . $this->Longitude->formatDecimal($precision); return $returnValue; }