MCPcopy Create free account
hub / github.com/alignoth/alignoth / ye

Function ye

resources/vega.min.js:1161–1182  ·  view source on GitHub ↗
(t, e, n)

Source from the content-addressed store, hash-verified

1159 ge = Math.sqrt(10),
1160 me = Math.sqrt(2);
1161 function ye(t, e, n) {
1162 const r = (e - t) / Math.max(0, n),
1163 i = Math.floor(Math.log10(r)),
1164 o = r / Math.pow(10, i),
1165 a = o >= pe ? 10 : o >= ge ? 5 : o >= me ? 2 : 1;
1166 let s, u, l;
1167 return (
1168 i < 0
1169 ? ((l = Math.pow(10, -i) / a),
1170 (s = Math.round(t * l)),
1171 (u = Math.round(e * l)),
1172 s / l < t && ++s,
1173 u / l > e && --u,
1174 (l = -l))
1175 : ((l = Math.pow(10, i) * a),
1176 (s = Math.round(t / l)),
1177 (u = Math.round(e / l)),
1178 s * l < t && ++s,
1179 u * l > e && --u),
1180 u < s && 0.5 <= n && n < 2 ? ye(t, e, 2 * n) : [s, u, l]
1181 );
1182 }
1183 function ve(t, e, n) {
1184 if (!((n = +n) > 0)) return [];
1185 if ((t = +t) === (e = +e)) return [t];

Callers 2

veFunction · 0.70
_eFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected