NevermoreEngine
NevermoreEngine copied to clipboard
Refactor qMath.MapNumber and qMath.LerpNumber to qMath.Map and qMath.Lerp, respectively
function Math.CompoundTransparency(a, b)
-- For when you need something to have a Transparency of a Transparency.
-- For example, a Ripple whose "Color" is Black with 0.46 Transparency (for gray)
-- that would, if it were any other color, have 0.8 or 0.9 Transparency
-- @param number a
-- @param number b
return a + b - a*b
end
function Math.Lerp(Start, Finish, Alpha)
-- Return intermediate value between Start and Finish
-- @param number Start
-- @param number Finish
-- @param number Alpha [0, 1]
return Start + Alpha * (Finish - Start)
end