/** * Find distance to another point * * @param Point $point2 * @param string $unit * @param int $formula formula to use, should either be Location::HAVERSINE or Location::VINCENTY. Defaults to * Location::$defaultFormula * * @return float the distance */ public function distanceTo(Point $point2, $unit = 'km', $formula = null) { return Location::calculateDistance($this, $point2, $unit, $formula); }