Module:Simplified fraction: Difference between revisions
Tristanbay (talk | contribs) fixing the stupidest mistake of all? |
Tristanbay (talk | contribs) maybe "mixed" param evaluates to string instead of bool |
||
| Line 16: | Line 16: | ||
local n = frame.args["n"] | local n = frame.args["n"] | ||
local d = frame.args["d"] | local d = frame.args["d"] | ||
local mixed = frame.args["mixed"] == "true" and true or false | |||
local num, denom = simplify(n, d) | local num, denom = simplify(n, d) | ||
local whole = | local whole = mixed and math.floor(num / denom) or 0 | ||
local ft | local ft | ||
if denom == 1 then | if denom == 1 then | ||