MCPcopy Create free account
hub / github.com/comaps/comaps / GetCoordBits

Function GetCoordBits

libs/coding/point_coding.cpp:88–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88uint8_t GetCoordBits(m2::RectD const & limitRect, double accuracy)
89{
90 auto const range = std::max(limitRect.SizeX(), limitRect.SizeY());
91 auto const valuesNumber = 1.0 + range / accuracy;
92 for (uint8_t coordBits = 1; coordBits <= 32; ++coordBits)
93 if (CoordSize(coordBits) >= valuesNumber)
94 return coordBits;
95 return 0;
96}
97
98// Obsolete functions ------------------------------------------------------------------------------
99

Callers 3

SaveMethod · 0.85
UNIT_TESTFunction · 0.85
SetGeometryParamsMethod · 0.85

Calls 3

CoordSizeFunction · 0.85
SizeXMethod · 0.80
SizeYMethod · 0.80

Tested by 1

UNIT_TESTFunction · 0.68