MCPcopy Create free account
hub / github.com/davy7125/polyphone / doubleToString

Method doubleToString

sources/editor/modulator/modulatorcell.cpp:413–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413QString ModulatorCell::doubleToString(double value)
414{
415 // Return a value as a string with 3 maximum characters after the decimal separator
416 QString txt = QLocale::system().toString(value, 'f', 3);
417 while (txt.size() > 1 && (txt.endsWith("0")))
418 txt = txt.left(txt.size() - 1);
419 if (txt.size() > 1 && (txt.endsWith(".") || txt.endsWith(",")))
420 txt = txt.left(txt.size() - 1);
421 return txt;
422}

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected