Jump to content

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 and precision > 0 then
         if current_precision <= 0 then
            local zero_sep = lang:formatNum( 1.1 );
            if precision >= 0 then
            formatted_num = formatted_num .. zero_sep:sub(2,2);
                local zero_sep = lang:formatNum( 1.1 );
            formatted_num = formatted_num .. string.rep( '0', precision );
                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 );
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.