diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-05-14 16:40:24 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-05-14 16:40:24 +0200 |
commit | b167a79c22ed3e65941305a7d8e0fedb796dd11f (patch) | |
tree | d18abbec96b0b12eb26d809b5b9abdc7b305c37c /src/map/tile.cpp | |
parent | b8d88600b81372a7544ebe420c562c4fa02592e9 (diff) | |
download | qtlocation-mapboxgl-b167a79c22ed3e65941305a7d8e0fedb796dd11f.tar.gz |
always use std:: namespace for math functions
fixes #201
Diffstat (limited to 'src/map/tile.cpp')
-rw-r--r-- | src/map/tile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/tile.cpp b/src/map/tile.cpp index 5e22dd0bb2..45fe88ee29 100644 --- a/src/map/tile.cpp +++ b/src/map/tile.cpp @@ -12,7 +12,7 @@ Tile::Tile(const ID& id) Tile::ID Tile::ID::parent(int8_t parent_z) const { assert(parent_z < z); - int32_t dim = pow(2, z - parent_z); + int32_t dim = std::pow(2, z - parent_z); return Tile::ID{ parent_z, (x >= 0 ? x : x - dim + 1) / dim, @@ -22,7 +22,7 @@ Tile::ID Tile::ID::parent(int8_t parent_z) const { std::forward_list<Tile::ID> Tile::ID::children(int32_t child_z) const { assert(child_z > z); - int32_t factor = pow(2, child_z - z); + int32_t factor = std::pow(2, child_z - z); std::forward_list<ID> children; for (int32_t ty = y * factor, y_max = (y + 1) * factor; ty < y_max; ++ty) { @@ -34,7 +34,7 @@ std::forward_list<Tile::ID> Tile::ID::children(int32_t child_z) const { } Tile::ID Tile::ID::normalized() const { - int32_t dim = pow(2, z); + int32_t dim = std::pow(2, z); int32_t nx = x, ny = y; while (nx < 0) nx += dim; while (nx >= dim) nx -= dim; @@ -45,7 +45,7 @@ bool Tile::ID::isChildOf(const Tile::ID &parent) const { if (parent.z >= z || parent.w != w) { return false; } - int32_t scale = pow(2, z - parent.z); + int32_t scale = std::pow(2, z - parent.z); return parent.x == ((x < 0 ? x - scale + 1 : x) / scale) && parent.y == y / scale; } |