Category talk:Wren-fmt: Difference between revisions
Content deleted Content added
→Source code: Minor bug fix. |
→Source code: Bug fix. |
||
Line 273: | Line 273: | ||
var d = (n - i).abs |
var d = (n - i).abs |
||
var pw = 10.pow(p) |
var pw = 10.pow(p) |
||
d = (d * pw).round |
d = (d * pw).round |
||
if (d >= pw) { |
|||
ns = "%(Conv.dec(n.round))" |
|||
d = 0 |
|||
} |
|||
if (d == 0) return s(w, ns + "." + "0" * p) |
if (d == 0) return s(w, ns + "." + "0" * p) |
||
var ds = "%(d)" |
var ds = "%(d)" |