| 21 | } |
| 22 | |
| 23 | std::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 |
| 31 | Because formulas are lowercased for case-insensitivity, all variables must be lowercase. |
nothing calls this directly
no test coverage detected