Skip to content

Commit

Permalink
Remove latitude rounding in yToLat
Browse files Browse the repository at this point in the history
  • Loading branch information
oxidase committed May 15, 2016
1 parent 73a6088 commit 3bbd3a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions features/testbot/compression.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Feature: Geometry Compression

When I route I should get
| from | to | route | distance | speed |
| b | e | abcdef,abcdef | 589m | 36 km/h |
| e | b | abcdef,abcdef | 589m | 36 km/h |
| b | e | abcdef,abcdef | 588.8m | 36 km/h |
| e | b | abcdef,abcdef | 588.8m | 36 km/h |
2 changes: 1 addition & 1 deletion features/testbot/matching.feature
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ Feature: Basic Map Matching
When I match I should get
| trace | matchings | annotation |
| abeh | abcedgh | 1:9.897633,0:0,1:10.008842,1:10.008842,1:10.008842,0:0,2:20.017685,1:10.008842 |
| abci | abc,ci | 1:9.897633,0:0,1:10.008842,0:0.111209,1:10.121593 |
| abci | abc,ci | 1:9.897633,0:0,1:10.008842,0:0.111209,1:10.010367 |
2 changes: 1 addition & 1 deletion include/util/web_mercator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inline FloatLatitude yToLat(const double y)
const double normalized_lat =
detail::RAD_TO_DEGREE * 2. * std::atan(std::exp(clamped_y * detail::DEGREE_TO_RAD));

return FloatLatitude(std::round(normalized_lat * COORDINATE_PRECISION) / COORDINATE_PRECISION - 90.);
return FloatLatitude(normalized_lat - 90.);
}

inline double latToY(const FloatLatitude latitude)
Expand Down

0 comments on commit 3bbd3a8

Please sign in to comment.