PHP Interface Treffynnon\Navigator\Distance\Calculator\CalculatorInterface

Mostrar archivo Open project: treffynnon/navigator

Public Methods

Method Description
__construct ( Treffynnon\Navigator\CelestialBody\CelestialBodyAbstract $body = null )
calculate ( Treffynnon\Navigator\LatLong $point1, Treffynnon\Navigator\LatLong $point2 ) : float Calculate the distance between two coordinates
getCelestialBody ( )
setCelestialBody ( Treffynnon\Navigator\CelestialBody\CelestialBodyAbstract $body )

Method Details

__construct() public method

public __construct ( Treffynnon\Navigator\CelestialBody\CelestialBodyAbstract $body = null )
$body Treffynnon\Navigator\CelestialBody\CelestialBodyAbstract

calculate() public method

Calculate the distance between two coordinates
public calculate ( Treffynnon\Navigator\LatLong $point1, Treffynnon\Navigator\LatLong $point2 ) : float
$point1 Treffynnon\Navigator\LatLong
$point2 Treffynnon\Navigator\LatLong
return float Distance in metres

getCelestialBody() public method

public getCelestialBody ( )

setCelestialBody() public method

public setCelestialBody ( Treffynnon\Navigator\CelestialBody\CelestialBodyAbstract $body )
$body Treffynnon\Navigator\CelestialBody\CelestialBodyAbstract