diff options
Diffstat (limited to 'src/mbgl/util/tile_coordinate.hpp')
-rw-r--r-- | src/mbgl/util/tile_coordinate.hpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mbgl/util/tile_coordinate.hpp b/src/mbgl/util/tile_coordinate.hpp index 4710e08d0a..a989bef0c9 100644 --- a/src/mbgl/util/tile_coordinate.hpp +++ b/src/mbgl/util/tile_coordinate.hpp @@ -5,23 +5,11 @@ namespace mbgl { -struct TileCoordinate { +class TileCoordinate { +public: double column; double row; double zoom; - - TileCoordinate(double column_, double row_, double zoom_) : - column(column_), row(row_), zoom(zoom_) {} - - TileCoordinate zoomTo(double targetZoom) { - double scale = std::pow(2, targetZoom - zoom); - return { column * scale, row * scale, targetZoom }; - } - - TileCoordinate operator-(TileCoordinate c) { - c = c.zoomTo(zoom); - return { column - c.column, row - c.row, zoom }; - }; }; } // namespace mbgl |