API change: Call interpolator only when interpolation ongoing.

This commit is contained in:
Matthias Richter 2011-01-20 15:26:12 +01:00
parent 9bcb428555
commit 762de78e51

View File

@ -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