Fix zero decimal formatting
This commit is contained in:
parent
a1515d54c4
commit
2276f0ef45
@ -1350,8 +1350,10 @@ sealed class Decimal : Number(), Comparable<Decimal> {
|
||||
}
|
||||
|
||||
override fun toString(decimals: Int): String {
|
||||
if (decimals <= 0)
|
||||
if (decimals == 0)
|
||||
return "0"
|
||||
else if (decimals < 0)
|
||||
return "0.0"
|
||||
else
|
||||
return "0." + "0".repeat(decimals)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user