local function A(A,i)assert(typeof(A)=="\078\117\109\098\101\114\083\101\113\117\101\110\099\101","\077\117\115\116 \112\097\115\115 \097 \118\097\108\105\100 \078\117\109\098\101\114\083\101\113\117\101\110\099\101\046")assert(typeof(i)=="\110\117\109\098\101\114","\077\117\115\116 \112\097\115\115 \097 \118\097\108\105\100 \110\117\109\098\101\114\046")i=math.clamp(i,0,1)if i==0 then return A.Keypoints[1].Value end if i==1 then return A.Keypoints[#A.Keypoints].Value end for V=1,#A.Keypoints,1 do local j=A.Keypoints[V]local M=A.Keypoints[V+1]if i>=j.Time and i<M.Time then local A=(i-j.Time)/(M.Time-j.Time)return(M.Value-j.Value)*A+j.Value end end end return A
local function evaluateNumberSequence(sequence, value)
	assert(typeof(sequence) == "NumberSequence", "Must pass a valid NumberSequence.")
	assert(typeof(value) == "number", "Must pass a valid number.")

	value = math.clamp(value, 0, 1)

	if value == 0 then
		return sequence.Keypoints[1].Value
	end

	if value == 1 then
		return sequence.Keypoints[#sequence.Keypoints].Value
	end

	for i = 1, #sequence.Keypoints do
		local this = sequence.Keypoints[i]
		local next = sequence.Keypoints[i + 1]

		if value >= this.Time and value < next.Time then
			local alpha = (value - this.Time) / (next.Time - this.Time)
			return (next.Value - this.Value) * alpha + this.Value
		end
	end
end

return evaluateNumberSequence
