Location\Bearing\BearingSphericalTest::testIfCalculateDestinationSouthernWorksAsExpected PHP Method

testIfCalculateDestinationSouthernWorksAsExpected() public method

    public function testIfCalculateDestinationSouthernWorksAsExpected()
    {
        $bearingCalculator = new BearingSpherical();
        $point = new Coordinate(0, 0);
        $destination = $bearingCalculator->calculateDestination($point, 180, 111195.0837);
        // 1 degree in longitude at the equator:
        // 2πr/360 = 40030230.1407 meters/360 = 111195.0837 meters
        $this->assertEquals(-1.0, $destination->getLat(), '', 0.0001);
        $this->assertEquals(0.0, $destination->getLng(), '', 0.0001);
    }