Category talk:Wren-fmt: Difference between revisions
Content deleted Content added
→Source code: Added support for Unicode number formats and printing polynomials. |
→Source code: Fixed a bug in spwrite routine. |
||
Line 980: | Line 980: | ||
if (coef == 0) continue |
if (coef == 0) continue |
||
if (coef > 0) { |
if (coef > 0) { |
||
var t = Fmt.swrite(fmt, coef) |
|||
if (pow > 0 && coef == 1 && t[-1] == "1") t = t[0...-1] |
|||
p = p + " + " + t |
|||
} else { |
} else { |
||
var t = Fmt.swrite(fmt, -coef) |
|||
if (pow > 0 && coef == -1 && t[-1] == "1") t = t[0...-1] |
|||
p = p + " - " + t |
|||
} |
} |
||
if (pow > 1) { |
if (pow > 1) { |