Browse Source

Use "inf" instead of "∞" for quantity display value, since users can't easily type it in the ParamField.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
914fdfcba6
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      src/Quantity.cpp

+ 1
- 5
src/Quantity.cpp View File

@@ -21,11 +21,7 @@ int Quantity::getDisplayPrecision() {

std::string Quantity::getDisplayValueString() {
float v = getDisplayValue();
if (v == INFINITY)
return "∞";
else if (v == -INFINITY)
return "-∞";
else if (std::isnan(v))
if (std::isnan(v))
return "NaN";
return string::f("%.*g", getDisplayPrecision(), math::normalizeZero(v));
}


Loading…
Cancel
Save