Add the function function ExportScript.Tools.negate() to negate the transfer values.

This commit is contained in:
mcmicha 2017-03-08 23:20:10 +01:00
parent e28f686b4b
commit 446f2d6364

View File

@ -134,10 +134,21 @@ function ExportScript.Tools.subst(s, t)
return s
end
--[[
function ExportScript.Tools.round(num, idp)
local lMult = 10^(idp or 0)
return math.floor(num * lMult + 0.5) / lMult
end
]]
-- this function negate the numeric input values
function ExportScript.Tools.negate(Input)
if type(Input) == "number" then
return (Input > 0.0 and (0 - Input) or (Input - Input - Input))
else
return Input
end
end
-- Status Gathering Functions
function ExportScript.Tools.ProcessArguments(device, arguments)