--// Graphing functions \\--


local function graphPoint(t : number, ... : Vector3) : Vector3
	assert(t >= 0 and t <= 1, t .. "t is not between 0 and 1.")
	local points = {...}
	local n : number = #points - 1
	local p : Vector3 = nil
	for i = 0, n do
		local x = binomial(n,i)*(1 - t)^(n-i) * t^i * points[i+1] 
		p = p and p + x or x
	end
	return p
end
