Module:Math: Difference between revisions

161 bytes added ,  11 years ago
input check
m>Dragons flight
No edit summary
m>Dragons flight
(input check)
Line 122: Line 122:
     local value = tonumber( frame.args[1] or 0 );
     local value = tonumber( frame.args[1] or 0 );
     local precision = tonumber( frame.args[2] or 0 );
     local precision = tonumber( frame.args[2] or 0 );
   
    -- Check for non-numeric input
    if value == nil or precision == nil then
        return 'Formatting error: invalid input when rounding'
    end
   
     local current_precision = z._precision( value );
     local current_precision = z._precision( value );


Anonymous user