function Blend.AccelTween(F,c)local t=Blend.toPropertyObservable(F)or Rx.of(F)local D=Blend.toNumberObservable(c)local function C(F,c)local t=AccelTween.new(c)if D then F:GiveTask(D:Subscribe(function(F)assert(type(F)=="\110\117\109\098\101\114","\066\097\100 \118\097\108\117\101")t.a=F end))end return t end return Observable.new(function(F)local c local D=Maid.new()local U,m=StepUtils.bindToRenderStep(function()F:Fire(c.p)return c.rtime>0 end)D:GiveTask(m)D:GiveTask(t:Subscribe(function(F)c=c or C(D,F)c.t=F U()end))return D end)end

function Blend.AccelTween(source, acceleration)
	local sourceObservable = Blend.toPropertyObservable(source) or Rx.of(source)
	local accelerationObservable = Blend.toNumberObservable(acceleration)

	local function createAccelTween(maid, initialValue)
		local accelTween = AccelTween.new(initialValue)

		if accelerationObservable then
			maid:GiveTask(accelerationObservable:Subscribe(function(value)
				assert(type(value) == "number", "Bad value")
				accelTween.a = value
			end))
		end

		return accelTween
	end

	-- TODO: Centralize and cache
	return Observable.new(function(sub)
		local accelTween
		local maid = Maid.new()

		local startAnimate, stopAnimate = StepUtils.bindToRenderStep(function()
			sub:Fire(accelTween.p)
			return accelTween.rtime > 0
		end)

		maid:GiveTask(stopAnimate)
		maid:GiveTask(sourceObservable:Subscribe(function(value)
			accelTween = accelTween or createAccelTween(maid, value)
			accelTween.t = value
			startAnimate()
		end))

		return maid
	end)
end
