Свойство | Type | Description | |
---|---|---|---|
$point1 | N\LatLong | The first coordinate | |
$point2 | N\LatLong | The second coordinate |
Méthode | Description | |
---|---|---|
__construct ( Treffynnon\Navigator\LatLong $point1, Treffynnon\Navigator\LatLong $point2 ) | Instantiate the distance object and supply the two coordinates to calculate the distance between them | |
get ( Treffynnon\Navigator\Distance\Calculator\CalculatorInterface $calculator = null, Treffynnon\Navigator\Distance\Converter\ConverterInterface $unit_converter = null ) : float | Calculate the distance between two points. Defaults to Vincenty if no calculator is supplied. If no unit converter is supplied then the formula will return a value in metres. |
public __construct ( Treffynnon\Navigator\LatLong $point1, Treffynnon\Navigator\LatLong $point2 ) | ||
$point1 | Treffynnon\Navigator\LatLong | |
$point2 | Treffynnon\Navigator\LatLong |
public get ( Treffynnon\Navigator\Distance\Calculator\CalculatorInterface $calculator = null, Treffynnon\Navigator\Distance\Converter\ConverterInterface $unit_converter = null ) : float | ||
$calculator | Treffynnon\Navigator\Distance\Calculator\CalculatorInterface | |
$unit_converter | Treffynnon\Navigator\Distance\Converter\ConverterInterface | |
Résultat | float |