MCPcopy Create free account
hub / github.com/LAStools/LAStools / DoubleToString

Function DoubleToString

LASzip/src/mydefs.cpp:767–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765}
766
767std::string DoubleToString(double dd, short decimals, bool trim_right_zeros) {
768 char xx[44];
769 int cnt = snprintf(xx, 44, "%.*f", decimals, dd);
770 if (trim_right_zeros) {
771 while ((cnt > 0) && ((xx[cnt - 1] == '0') || (xx[cnt - 1] == '.'))) {
772 xx[cnt - 1] = '\0';
773 cnt--;
774 }
775 }
776 return xx;
777}
778
779std::string CcToUnderline(const std::string& in) {
780 std::string res;

Callers 3

runMethod · 0.85
GeoTiffInfoMethod · 0.85
get_scan_angle_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected