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