code/models/fieldtypes/Location.php
public function getDistanceFromLocation(Location $location, $scale = 'km'){
		return GeoFunctions::getDistance($this->getLatitude(), $this->getLongditude(), $location->getLatitude(), $location->getLongditude(), $scale);
	}
public function getDistanceFromLocation(Location $location, $scale = 'km'){
		return GeoFunctions::getDistance($this->getLatitude(), $this->getLongditude(), $location->getLatitude(), $location->getLongditude(), $scale);
	}
public function getDistanceFromLocation ( Location $ location , $ scale = 'km' ) { return GeoFunctions :: getDistance ( $ this -> getLatitude ( ) , $ this -> getLongditude ( ) , $ location -> getLatitude ( ) , $ location -> getLongditude ( ) , $ scale ) ; }
return the Distance to the given location
return the Distance to the given location