Unit.toString() now displays NaN as N/A. This brings it in agreement with

Unit.toStringUnit()
This commit is contained in:
JoePfeiffer 2022-12-24 20:10:33 -07:00
parent 4d65a65a30
commit 19aed2a216

View File

@ -90,6 +90,9 @@ public abstract class Unit {
* @return A string representation of the number in these units.
*/
public String toString(double value) {
if (Double.isNaN(value))
return "N/A";
double val = toUnit(value);
if (Math.abs(val) > 1E6) {