Module:MoneyMakingGuide: Difference between revisions

Add one extra decimal place to dynamic rounding
(Add dynamic decimal place rounding)
(Add one extra decimal place to dynamic rounding)
Line 33: Line 33:
     if    number >= 1000 then return 0
     if    number >= 1000 then return 0
     elseif number >= 100 then return 1
     elseif number >= 100 then return 1
     elseif number >= 0.01 then return 2
     elseif number >= 0.1 then return 2
     elseif number >= 0.001  then return 3
    elseif number >= 0.01 then return 3
     elseif number >= 0.0001 then return 4
     elseif number >= 0.001  then return 4
     elseif number >= 0.00001 then return 5
     elseif number >= 0.0001 then return 5
     else return 6
     elseif number >= 0.00001 then return 6
     else return 7
     end
     end
end
end
2,875

edits