allow writing zeroes as decimal values
This commit is contained in:
parent
82479f4854
commit
c90c123971
|
@ -76,6 +76,11 @@ public class CalculatorImpl {
|
|||
}
|
||||
|
||||
private String formatString(String str) {
|
||||
// if the number contains a decimal, do not try removing the leading zero anymore, nor add group separator
|
||||
// it would prevent writing values like 1.02
|
||||
if (str.contains("."))
|
||||
return str;
|
||||
|
||||
final double doubleValue = Formatter.stringToDouble(str);
|
||||
return Formatter.doubleToString(doubleValue);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue