wowowowowowowo so much stuff

This commit is contained in:
0x81c 2015-03-14 05:36:02 -04:00
parent fe21cb61e3
commit 2f40eaf000
249 changed files with 391 additions and 20 deletions

18
_helpers.lua Normal file
View file

@ -0,0 +1,18 @@
function constrain(val, low, high)
if val > high then
return high
elseif val < low then
return low
else
return val
end
end
function map(value, inMin, inMax, outMin, outMax)
local inPercent = value / (inMax - inMin)
return (outMax - outMin) * (inPercent) + outMin
end
function lerp(a, b, amount)
return (1 - amount) * a + (amount * b)
end