//#region ../../node_modules/d3-array/src/ticks.js
var e = Math.sqrt(50), t = Math.sqrt(10), n = Math.sqrt(2);
function r(i, a, o) {
	let s = (a - i) / Math.max(0, o), c = Math.floor(Math.log10(s)), l = s / 10 ** c, u = l >= e ? 10 : l >= t ? 5 : l >= n ? 2 : 1, d, f, p;
	return c < 0 ? (p = 10 ** -c / u, d = Math.round(i * p), f = Math.round(a * p), d / p < i && ++d, f / p > a && --f, p = -p) : (p = 10 ** c * u, d = Math.round(i / p), f = Math.round(a / p), d * p < i && ++d, f * p > a && --f), f < d && .5 <= o && o < 2 ? r(i, a, o * 2) : [
		d,
		f,
		p
	];
}
function i(e, t, n) {
	if (t = +t, e = +e, n = +n, !(n > 0)) return [];
	if (e === t) return [e];
	let i = t < e, [a, o, s] = i ? r(t, e, n) : r(e, t, n);
	if (!(o >= a)) return [];
	let c = o - a + 1, l = Array(c);
	if (i) if (s < 0) for (let e = 0; e < c; ++e) l[e] = (o - e) / -s;
	else for (let e = 0; e < c; ++e) l[e] = (o - e) * s;
	else if (s < 0) for (let e = 0; e < c; ++e) l[e] = (a + e) / -s;
	else for (let e = 0; e < c; ++e) l[e] = (a + e) * s;
	return l;
}
function a(e, t, n) {
	return t = +t, e = +e, n = +n, r(e, t, n)[2];
}
function o(e, t, n) {
	t = +t, e = +e, n = +n;
	let r = t < e, i = r ? a(t, e, n) : a(e, t, n);
	return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
}
//#endregion
export { i as default, a as tickIncrement, o as tickStep };
