box-of-eases/util.lua
2021-09-19 14:14:38 +03:00

9 lines
No EOL
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