#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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user