mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
API change: Call interpolator only when interpolation ongoing.
This commit is contained in:
parent
9bcb428555
commit
762de78e51
@ -68,7 +68,7 @@ function Interpolator(length, func)
|
|||||||
local t = 0
|
local t = 0
|
||||||
return function(dt, ...)
|
return function(dt, ...)
|
||||||
t = t + dt
|
t = t + dt
|
||||||
return t <= length or nil, func(min(1, (t-dt)/length), ...)
|
return t <= length and func((t-dt)/length, ...) or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user