feat: add an either function

This commit is contained in:
Kazhnuz 2021-08-26 23:23:32 +02:00
parent 4322a80571
commit 01a30e73b2

View file

@ -56,6 +56,14 @@ function Math.between(num, value1, value2)
return math.min(math.max(num, min), max) return math.min(math.max(num, min), max)
end end
function Math.either(bool, val1, val2)
if (bool) then
return val1
else
return val2
end
end
-- VECTOR/DIRECTION functions -- VECTOR/DIRECTION functions
-- Easy-to-use function to handle point and motion -- Easy-to-use function to handle point and motion