box-of-eases/src/util.lua

9 lines
151 B
Lua

function mix(x, y, a)
return x * (1 - a) + y * a
end
function math.sign(x)
if x < 0 then return -1 end
if x > 0 then return 1 end
return 0
end