Module:Math: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
en>Dragons flight m (really fix trailing periods) |
en>Dragons flight (deal with unary minus) |
||
Line 119: | Line 119: | ||
end |
end |
||
local formatted_num |
local formatted_num; |
||
-- Use proper unary minus sign rather than ASCII default |
|||
if value < 0 then |
|||
formatted_num = '−'; |
|||
else |
|||
formatted_num = ''; |
|||
end |
|||
formatted_num = formatted_num .. lang:formatNum( math.abs(value) ); |
|||
local order; |
local order; |
||
Line 148: | Line 157: | ||
-- Add exponential notation, if necessary. |
-- Add exponential notation, if necessary. |
||
if order ~= 0 then |
if order ~= 0 then |
||
-- Use proper unary minus sign rather than ASCII default |
|||
⚫ | |||
if order < 0 then |
|||
order = '−' .. lang:formatNum( math.abs(order) ); |
|||
else |
|||
order = lang:formatNum( order ); |
|||
end |
|||
⚫ | |||
end |
end |
||