Modul:Math: Unterschied zwischen den Versionen
whitespace
(Add precision calculation) |
(whitespace) |
||
Zeile 21: | Zeile 21: | ||
function z._precision( x ) | function z._precision( x ) | ||
x = string.upper( x ) | x = string.upper( x ) | ||
-- Remove leading / trailing whitespace | |||
x = x:match "^%s*(.-)%s*$"; | |||
local decimal = string.find( x, '.', 1, true ) | local decimal = string.find( x, '.', 1, true ) | ||
local exponent = string.find( x, 'E', 1, true ) | local exponent = string.find( x, 'E', 1, true ) |