MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / truncate_float

Function truncate_float

extlibs/vili/src/utils.cpp:54–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 std::string truncate_float(const std::string& str)
55 {
56 std::string result = str;
57 while (
58 result.size() > 2 && result.back() == '0' && result[result.size() - 2] != '.')
59 result.pop_back();
60 return result;
61 }
62
63 std::string quote(const std::string& str)
64 {

Callers 1

dumpMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected