Module:Utils: Difference between revisions

Fredg999 (talk | contribs)
Bug fixing
Fredg999 (talk | contribs)
Bug fixing
Line 26: Line 26:


-- return x rounded to a precision of p decimal places
-- return x rounded to a precision of p decimal places
function p.round(x, frame)
function p.round(frame)
-- x defaults to 0 if omitted
-- x defaults to 0 if omitted
local x = eval_num_arg(frame.args[1], 0)
local x = eval_num_arg(frame.args[1], 0)