Skip to content

Commit

Permalink
compare ellipsoids by their name/ID
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaschen committed Jul 19, 2018
1 parent 940fd1f commit 1ac6b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Location/Distance/Vincenty.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Vincenty implements DistanceInterface
*/
public function getDistance(Coordinate $point1, Coordinate $point2): float
{
if ($point1->getEllipsoid() != $point2->getEllipsoid()) {
if ($point1->getEllipsoid()->getName() !== $point2->getEllipsoid()->getName()) {
throw new NotMatchingEllipsoidException('The ellipsoids for both coordinates must match');
}

Expand Down

0 comments on commit 1ac6b54

Please sign in to comment.