Corrections after colleagues comments.

This commit is contained in:
Vladimir Byko-Ianko 2015-11-19 16:23:02 +03:00 committed by r.kuznetsov
parent 6398ad8af2
commit 92185dc598

View file

@ -2,10 +2,8 @@
inline double VisualScale(double exactDensityDPI)
{
double const mdpiDensityDPI = 160.;
double constexpr kMdpiDensityDPI = 160.;
// For some old devices (for example iPad 2) the density could be less than 160 DPI.
// Returns one in that case to keep readable text on the map.
if (exactDensityDPI <= mdpiDensityDPI)
return 1.;
return exactDensityDPI / mdpiDensityDPI;
return max(1., exactDensityDPI / kMdpiDensityDPI);
}