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:
parent
b53cebb8ca
commit
fbf017786e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user