calculateBearing() public method

This method calculates the initial bearing between the two points.
public calculateBearing ( Coordinate $point1, Coordinate $point2 ) : float
$point1 Location\Coordinate
$point2 Location\Coordinate
return float Bearing Angle
Ejemplo n.º 1
0
 public function testIfCalculateBearingSouthWesternWorksAsExpected()
 {
     $point1 = new Coordinate(0, 0);
     $point2 = new Coordinate(-0.1, -0.1);
     $bearingCalculator = new BearingSpherical();
     $this->assertEquals(225.0, $bearingCalculator->calculateBearing($point1, $point2), '', 0.1);
 }