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

Method _simplify

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

Source from the content-addressed store, hash-verified

25565 );
25566 }
25567 _simplify(t) {
25568 if (t && t.length > 4) {
25569 for (let e = 0; e < t.length; e += 2) {
25570 const n = (e + 2) % t.length,
25571 r = (e + 4) % t.length;
25572 ((t[e] === t[n] && t[n] === t[r]) ||
25573 (t[e + 1] === t[n + 1] && t[n + 1] === t[r + 1])) &&
25574 (t.splice(n, 2), (e -= 2));
25575 }
25576 t.length || (t = null);
25577 }
25578 return t;
25579 }
25580 };
25581 const KF = 2 * Math.PI,
25582 tS = Math.pow;

Callers 1

_clipMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected