ElEditors, Interface administrators, Administrators
70,975
edits
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
return true | return true | ||
end | end | ||
end | |||
end | |||
function inArrayValue(value, array) | |||
for k, v in pairs(array) do | |||
if v == value then return true end | |||
end | end | ||
end | end | ||
Line 148: | Line 154: | ||
decimals = math.pow(10, decimals or 0) | decimals = math.pow(10, decimals or 0) | ||
num = num * decimals | num = num * decimals | ||
if num >= 0 then num = math.floor(num + 0.5) else num = math.ceil(num - 0.5) end | if num >= 0 then | ||
num = math.floor(num + 0.5) | |||
else | |||
num = math.ceil(num - 0.5) | |||
end | |||
return num / decimals | return num / decimals | ||
end | end |