Refonte pour utiliser le systeme de GUI #112
1 changed files with 12 additions and 0 deletions
|
@ -64,6 +64,18 @@ function Math.either(bool, val1, val2)
|
|||
end
|
||||
end
|
||||
|
||||
function Math.wrap(val, min, max)
|
||||
while (val < min) do
|
||||
local diff = ((min-1) - val)
|
||||
val = max - diff
|
||||
end
|
||||
while (val > max) do
|
||||
local diff = ((max+1) - val)
|
||||
val = min + diff
|
||||
end
|
||||
return val
|
||||
end
|
||||
|
||||
-- VECTOR/DIRECTION functions
|
||||
-- Easy-to-use function to handle point and motion
|
||||
|
||||
|
|
Loading…
Reference in a new issue