mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 22:24:35 +00:00
fixed mathx.ease_inout
This commit is contained in:
parent
0be82a31df
commit
658c8e7117
@ -109,8 +109,8 @@ end
|
|||||||
--quadratic ease in and out
|
--quadratic ease in and out
|
||||||
--(a lot like smoothstep)
|
--(a lot like smoothstep)
|
||||||
function mathx.ease_inout(f)
|
function mathx.ease_inout(f)
|
||||||
if t < 0.5 then
|
if f < 0.5 then
|
||||||
return t * t * 2
|
return f * f * 2
|
||||||
end
|
end
|
||||||
local oneminus = (1 - f)
|
local oneminus = (1 - f)
|
||||||
return 1 - 2 * oneminus * oneminus
|
return 1 - 2 * oneminus * oneminus
|
||||||
|
Loading…
Reference in New Issue
Block a user