diff options
Diffstat (limited to 'src/mbgl/renderer/tile_pyramid.cpp')
-rw-r--r-- | src/mbgl/renderer/tile_pyramid.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/renderer/tile_pyramid.cpp b/src/mbgl/renderer/tile_pyramid.cpp index fd4356ca02..3fcdabd98f 100644 --- a/src/mbgl/renderer/tile_pyramid.cpp +++ b/src/mbgl/renderer/tile_pyramid.cpp @@ -240,7 +240,7 @@ void TilePyramid::update(const std::vector<Immutable<style::Layer::Impl>>& layer } } -void TilePyramid::handleWrapJump(float lng) { +void TilePyramid::handleWrapJump(double lng) { // On top of the regular z/x/y values, TileIDs have a `wrap` value that specify // which cppy of the world the tile belongs to. For example, at `lng: 10` you // might render z/x/y/0 while at `lng: 370` you would render z/x/y/1. @@ -257,9 +257,9 @@ void TilePyramid::handleWrapJump(float lng) { // // This enables us to reuse the tiles at more ideal locations and prevent flickering. - const float lngDifference = lng - prevLng; - const float worldDifference = lngDifference / 360; - const int wrapDelta = ::round(worldDifference); + const double lngDifference = lng - prevLng; + const double worldDifference = lngDifference / 360; + const int16_t wrapDelta = ::round(worldDifference); prevLng = lng; if (wrapDelta) { |