Module:Math: Difference between revisions
trailing dot
m>Dragons flight No edit summary |
m>Dragons flight (trailing dot) |
||
Line 135: | Line 135: | ||
-- Pad with zeros, if needed | -- Pad with zeros, if needed | ||
if current_precision < precision then | if current_precision < precision then | ||
if current_precision <= 0 | if current_precision <= 0 then | ||
if precision >= 0 then | |||
local zero_sep = lang:formatNum( 1.1 ); | |||
formatted_num = formatted_num .. zero_sep:sub(2,2); | |||
formatted_num = formatted_num .. string.rep( '0', precision ); | |||
end | |||
else | else | ||
formatted_num = formatted_num .. string.rep( '0', precision - current_precision ); | formatted_num = formatted_num .. string.rep( '0', precision - current_precision ); |