MCPcopy Index your code
hub / github.com/idank/explainshell / position

Function position

explainshell/web/static/js/d3.v3.js:5325–5329  ·  view source on GitHub ↗
(dimension, size)

Source from the content-addressed store, hash-verified

5323 charges = [];
5324 if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;
5325 function position(dimension, size) {
5326 var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
5327 while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
5328 return Math.random() * size;
5329 }
5330 function neighbor() {
5331 if (!neighbors) {
5332 neighbors = [];

Callers 4

d3.v3.jsFile · 0.85
partitionFunction · 0.85
squarifyFunction · 0.85
stickifyFunction · 0.85

Calls 2

neighborFunction · 0.85
roundFunction · 0.85

Tested by

no test coverage detected