feat: add an either function
This commit is contained in:
parent
4322a80571
commit
01a30e73b2
1 changed files with 8 additions and 0 deletions
|
@ -56,6 +56,14 @@ function Math.between(num, value1, value2)
|
|||
return math.min(math.max(num, min), max)
|
||||
end
|
||||
|
||||
function Math.either(bool, val1, val2)
|
||||
if (bool) then
|
||||
return val1
|
||||
else
|
||||
return val2
|
||||
end
|
||||
end
|
||||
|
||||
-- VECTOR/DIRECTION functions
|
||||
-- Easy-to-use function to handle point and motion
|
||||
|
||||
|
|
Loading…
Reference in a new issue