math::iround

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-08-14 22:54:56 +03:00
committed by Konstantin Pastbin
parent 7781528263
commit 836c39ff64
8 changed files with 42 additions and 20 deletions

View File

@@ -12,6 +12,7 @@
#include "indexer/scales.hpp"
#include "base/logging.hpp"
#include "base/math.hpp"
#include <algorithm>
#include <array>
@@ -306,7 +307,7 @@ bool TrafficRenderer::CanBeRenderedAsLine(RoadClass const & roadClass, int zoomL
if (it == lineDrawerEnd)
return false;
width = std::max(1, static_cast<int>(std::lround(TrafficRenderer::GetPixelWidthInternal(roadClass, zoomLevel))));
width = std::max(1, math::iround(TrafficRenderer::GetPixelWidthInternal(roadClass, zoomLevel)));
return width <= dp::SupportManager::Instance().GetMaxLineWidth();
}
} // namespace df