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

Function OSMDistanceToMetersString

libs/platform/measurement_utils.cpp:303–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303std::string OSMDistanceToMetersString(std::string const & osmRawValue, bool supportZeroAndNegativeValues,
304 int digitsAfterComma)
305{
306 double meters;
307 if (OSMDistanceToMeters(osmRawValue, meters))
308 {
309 if (!supportZeroAndNegativeValues && meters <= 0)
310 return {};
311 return strings::to_string_dac(meters, digitsAfterComma);
312 }
313 return {};
314}
315} // namespace measurement_utils

Callers 3

ValidateAndFormat_eleMethod · 0.85
UNIT_TESTFunction · 0.85

Calls 2

OSMDistanceToMetersFunction · 0.85
to_string_dacFunction · 0.85

Tested by 1

UNIT_TESTFunction · 0.68