diff options
author | tatiana-kondakova <tatiana.kondakova@gmail.com> | 2018-02-27 12:34:45 +0300 |
---|---|---|
committer | Ilya Zverev <ilya@zverev.info> | 2018-03-07 14:23:20 +0300 |
commit | 96558e0bdcc327bedfbbaf2f3784cd11cb79a8ee (patch) | |
tree | a82f5d55e1c73e248e274d212c4034c8604b6cbe /drape_frontend/user_mark_shapes.cpp | |
parent | a3b711966bb0aa1fc3c9042e3d79802fae68a363 (diff) |
Getting rid of my::sq, math::sqr
Diffstat (limited to 'drape_frontend/user_mark_shapes.cpp')
-rw-r--r-- | drape_frontend/user_mark_shapes.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drape_frontend/user_mark_shapes.cpp b/drape_frontend/user_mark_shapes.cpp index 655d2b0d43..2531ac6279 100644 --- a/drape_frontend/user_mark_shapes.cpp +++ b/drape_frontend/user_mark_shapes.cpp @@ -20,6 +20,7 @@ #include "geometry/clipping.hpp" #include "geometry/mercator.hpp" +#include <cmath> #include <vector> namespace df @@ -348,7 +349,7 @@ void CacheUserLines(TileKey const & tileKey, ref_ptr<dp::TextureManager> texture if (simplify) { double const currentScaleGtoP = 1.0 / GetScale(tileKey.m_zoomLevel); - sqrScale = math::sqr(currentScaleGtoP); + sqrScale = currentScaleGtoP * currentScaleGtoP; } for (auto id : linesId) @@ -381,7 +382,7 @@ void CacheUserLines(TileKey const & tileKey, ref_ptr<dp::TextureManager> texture { spline.Reset(new m2::Spline(renderInfo.m_spline->GetSize())); - static double const kMinSegmentLength = math::sqr(4.0 * vs); + static double const kMinSegmentLength = std::pow(4.0 * vs, 2); m2::PointD lastAddedPoint; for (auto const & point : renderInfo.m_spline->GetPath()) { |