fixed mathx.ease_inout

This commit is contained in:
Max Cahill 2022-01-18 13:15:54 +11:00
parent 0be82a31df
commit 658c8e7117

View File

@ -109,8 +109,8 @@ end
--quadratic ease in and out
--(a lot like smoothstep)
function mathx.ease_inout(f)
if t < 0.5 then
return t * t * 2
if f < 0.5 then
return f * f * 2
end
local oneminus = (1 - f)
return 1 - 2 * oneminus * oneminus