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

Function ed

resources/vega.min.js:10265–10354  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

10263 return (e, n) => -t(-e, n);
10264 }
10265 function ed(t) {
10266 const e = t(Xh, Jh),
10267 n = e.domain;
10268 let r,
10269 i,
10270 o = 10;
10271 function a() {
10272 return (
10273 (r = (function (t) {
10274 return t === Math.E
10275 ? Math.log
10276 : (10 === t && Math.log10) ||
10277 (2 === t && Math.log2) ||
10278 ((t = Math.log(t)), (e) => Math.log(e) / t);
10279 })(o)),
10280 (i = (function (t) {
10281 return 10 === t
10282 ? Kh
10283 : t === Math.E
10284 ? Math.exp
10285 : (e) => Math.pow(t, e);
10286 })(o)),
10287 n()[0] < 0 ? ((r = td(r)), (i = td(i)), t(Zh, Qh)) : t(Xh, Jh),
10288 e
10289 );
10290 }
10291 return (
10292 (e.base = function (t) {
10293 return arguments.length ? ((o = +t), a()) : o;
10294 }),
10295 (e.domain = function (t) {
10296 return arguments.length ? (n(t), a()) : n();
10297 }),
10298 (e.ticks = (t) => {
10299 const e = n();
10300 let a = e[0],
10301 s = e[e.length - 1];
10302 const u = s < a;
10303 u && ([a, s] = [s, a]);
10304 let l,
10305 c,
10306 f = r(a),
10307 h = r(s);
10308 const d = null == t ? 10 : +t;
10309 let p = [];
10310 if (!(o % 1) && h - f < d) {
10311 if (((f = Math.floor(f)), (h = Math.ceil(h)), a > 0)) {
10312 for (; f <= h; ++f)
10313 for (l = 1; l < o; ++l)
10314 if (((c = f < 0 ? l / i(-f) : l * i(f)), !(c < a))) {
10315 if (c > s) break;
10316 p.push(c);
10317 }
10318 } else
10319 for (; f <= h; ++f)
10320 for (l = o - 1; l >= 1; --l)
10321 if (((c = f > 0 ? l / i(-f) : l * i(f)), !(c < a))) {
10322 if (c > s) break;

Callers 1

vega.min.jsFile · 0.70

Calls 10

veFunction · 0.85
jeFunction · 0.85
VhFunction · 0.85
tFunction · 0.70
aFunction · 0.70
nFunction · 0.70
rFunction · 0.70
iFunction · 0.70
OeFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected