Skip to content

Commit

Permalink
Longitude may not be a float. This is better.
Browse files Browse the repository at this point in the history
  • Loading branch information
tubalmartin committed Nov 7, 2014
1 parent 56d1f2a commit 348e922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spherical-geometry.class.php
Expand Up @@ -164,7 +164,7 @@ public static function clampLatitude($lat)
// Wrap longitude
public static function wrapLongitude($lng)
{
return $lng === (float) 180 ? $lng : fmod((fmod(($lng - -180), 360) + 360), 360) + -180;
return $lng == 180 ? $lng : fmod((fmod(($lng - -180), 360) + 360), 360) + -180;
}

/**
Expand Down

0 comments on commit 348e922

Please sign in to comment.