Module:Simplified fraction: Difference between revisions
Tristanbay (talk | contribs) (hopefully) formatting fix |
Tristanbay (talk | contribs) Undo revision 214299 by Tristanbay (talk) Tag: Undo |
||
| Line 23: | Line 23: | ||
ft = string.format("%d", num) | ft = string.format("%d", num) | ||
elseif whole ~= 0 then | elseif whole ~= 0 then | ||
ft = string.format(" | ft = string.format("%d %d⁄%d", whole, num - whole * denom, denom) | ||
else | else | ||
ft = string.format("%d⁄%d", num, denom) | ft = string.format("%d⁄%d", num, denom) | ||