MCPcopy Create free account
hub / github.com/audacity/audacity / FormatTempo

Function FormatTempo

src/AudacityMirProject.cpp:24–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace
23{
24auto FormatTempo(double value)
25{
26 auto rounded = std::to_string(std::round(value * 100) / 100);
27 rounded.erase(rounded.find_last_not_of('0') + 1, std::string::npos);
28 rounded.erase(rounded.find_last_not_of('.') + 1, std::string::npos);
29 return rounded;
30}
31} // namespace
32
33AudacityMirProject::AudacityMirProject(AudacityProject& project)

Callers 1

ShouldBeReconfiguredMethod · 0.85

Calls 2

to_stringFunction · 0.85
roundFunction · 0.85

Tested by

no test coverage detected