Skip to content

Commit

Permalink
Converted encoding floor to round
Browse files Browse the repository at this point in the history
  • Loading branch information
emcconville committed Aug 8, 2014
1 parent 7d6153c commit f395c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emcconville/Polyline/GoogleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function encodePoints($points)

foreach($points as $number) {
$number = (float)($number);
$number = floor($number * pow(10, $precision));
$number = (int)round($number * pow(10, $precision));
$diff = $number - $previous[$index % $tuple];
$previous[$index % $tuple] = $number;
$number = $diff;
Expand Down

0 comments on commit f395c20

Please sign in to comment.