Module:Simplified fraction: Difference between revisions
Tristanbay (talk | contribs) m Tristanbay moved page Module:Reduced fraction to Module:Simplified fraction: "Reduced" refers more to dividing or multiplying to fit within an equave |
Tristanbay (talk | contribs) Changed for now to not use stylized fractions; might be breaking mobile formatting on certain pages when used in scrolling tables |
||
| 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(" | ft = string.format("%d/%d", num, denom) | ||
end | end | ||
return frame:preprocess(ft) | return frame:preprocess(ft) | ||