#143 #103 #101 #102 work in progress auto control, added coordinator controls, save/auto load configuration, auto enable/disable on reactor PLC for auto control (untested)

This commit is contained in:
Mikayla Fischler
2023-01-26 18:26:26 -05:00
parent e808ee2be0
commit e9562a140c
17 changed files with 750 additions and 161 deletions

View File

@@ -202,6 +202,13 @@ function util.is_int(x)
return type(x) == "number" and x == math.floor(x)
end
-- get the sign of a number
---@param x number value
---@return integer sign (-1 for < 0, 1 otherwise)
function util.sign(x)
return util.trinary(x < 0, -1, 1)
end
-- round a number to an integer
---@return integer rounded
function util.round(x)