function basis(e, t, n, r, i) {
	var a = e * e, o = a * e;
	return ((1 - 3 * e + 3 * a - o) * t + (4 - 6 * a + 3 * o) * n + (1 + 3 * e + 3 * a - 3 * o) * r + o * i) / 6;
}
function basis_default(t) {
	var n = t.length - 1;
	return function(r) {
		var i = r <= 0 ? r = 0 : r >= 1 ? (r = 1, n - 1) : Math.floor(r * n), a = t[i], o = t[i + 1], s = i > 0 ? t[i - 1] : 2 * a - o, c = i < n - 1 ? t[i + 2] : 2 * o - a;
		return basis((r - i / n) * n, s, a, o, c);
	};
}
export { basis, basis_default as default };
