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

Function Uk

resources/vega.min.js:17990–18042  ·  view source on GitHub ↗
(t, e, n, r, i)

Source from the content-addressed store, hash-verified

17988 (this.n = this.p = null));
17989 }
17990 function Uk(t, e, n, r, i) {
17991 var o,
17992 a,
17993 s = [],
17994 u = [];
17995 if (
17996 (t.forEach(function (t) {
17997 if (!((e = t.length - 1) <= 0)) {
17998 var e,
17999 n,
18000 r = t[0],
18001 a = t[e];
18002 if (Rk(r, a)) {
18003 if (!r[2] && !a[2]) {
18004 for (i.lineStart(), o = 0; o < e; ++o)
18005 i.point((r = t[o])[0], r[1]);
18006 return void i.lineEnd();
18007 }
18008 a[0] += 2 * Ub;
18009 }
18010 (s.push((n = new Lk(r, t, null, !0))),
18011 u.push((n.o = new Lk(r, null, n, !1))),
18012 s.push((n = new Lk(a, t, null, !1))),
18013 u.push((n.o = new Lk(a, null, n, !0))));
18014 }
18015 }),
18016 s.length)
18017 ) {
18018 for (u.sort(e), qk(s), qk(u), o = 0, a = u.length; o < a; ++o)
18019 u[o].e = n = !n;
18020 for (var l, c, f = s[0]; ; ) {
18021 for (var h = f, d = !0; h.v; ) if ((h = h.n) === f) return;
18022 ((l = h.z), i.lineStart());
18023 do {
18024 if (((h.v = h.o.v = !0), h.e)) {
18025 if (d)
18026 for (o = 0, a = l.length; o < a; ++o)
18027 i.point((c = l[o])[0], c[1]);
18028 else r(h.x, h.n.x, 1, i);
18029 h = h.n;
18030 } else {
18031 if (d)
18032 for (l = h.p.z, o = l.length - 1; o >= 0; --o)
18033 i.point((c = l[o])[0], c[1]);
18034 else r(h.x, h.p.x, -1, i);
18035 h = h.p;
18036 }
18037 ((l = (h = h.o).z), (d = !d));
18038 } while (!h.v);
18039 i.lineEnd();
18040 }
18041 }
18042 }
18043 function qk(t) {
18044 if ((e = t.length)) {
18045 for (var e, n, r = 0, i = t[0]; ++r < e; )

Callers 2

jkFunction · 0.85
XkFunction · 0.85

Calls 6

RkFunction · 0.85
qkFunction · 0.85
lineStartMethod · 0.80
pointMethod · 0.80
lineEndMethod · 0.80
rFunction · 0.70

Tested by

no test coverage detected