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

Function DoubleToString

src/mydefs.cpp:771–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

get_scan_angle_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected