Be smart about displaying decimals.
This commit is contained in:
parent
e5679259fa
commit
3e57ef205d
@ -103,6 +103,10 @@ public abstract class Unit {
|
||||
}
|
||||
|
||||
val = roundForDecimalFormat(val);
|
||||
// Check for approximate integer
|
||||
if (Math.abs(val - Math.floor(val)) < 0.001) {
|
||||
return intFormat.format(val);
|
||||
}
|
||||
return decFormat.format(val);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user