mirror of
https://github.com/weyne85/DCS-ExportScripts.git
synced 2025-10-29 16:58:18 +00:00
Add the function function ExportScript.Tools.negate() to negate the transfer values.
This commit is contained in:
parent
e28f686b4b
commit
446f2d6364
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user