PHP Class Treffynnon\Navigator\Distance\Calculator\CalculatorAbstract

Inheritance: implements Treffynnon\Navigator\Distance\Calculator\CalculatorInterface
Mostrar archivo Open project: treffynnon/navigator

Public Properties

Property Type Description
$celestialBody

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() abstract public method

Calculate the distance between two coordinates
abstract 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

Property Details

$celestialBody public_oe property

public $celestialBody