fixed functionality of utils.lerp()

((a - b) + b)*t = a*t
switched to
(1-t)*b + a*t

visualization of change:
https://www.desmos.com/calculator/91ge9obdoi
This commit is contained in:
YellowTide 2017-05-19 07:01:07 -05:00 committed by GitHub
parent b53cebb8ca
commit fbf017786e

View File

@ -74,7 +74,7 @@ end
-- @param progress (0-1)
-- @return number
function utils.lerp(low, high, progress)
return ((high - low) + low) * progress
return (1 - progress) * low + progress * high
end
--- Exponential decay