MCPcopy Create free account
hub / github.com/VCVRack/Rack / getDisplayValueString

Method getDisplayValueString

src/Quantity.cpp:23–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23std::string Quantity::getDisplayValueString() {
24 float v = getDisplayValue();
25 if (std::isnan(v))
26 return "NaN";
27 return string::f("%.*g", getDisplayPrecision(), math::normalizeZero(v));
28}
29
30/** Build-in variables for tinyexpr
31Because formulas are lowercased for case-insensitivity, all variables must be lowercase.

Callers

nothing calls this directly

Calls 2

normalizeZeroFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected