MCPcopy Create free account
hub / github.com/breck7/scroll / score

Function score

external/.d3.js:13444–13451  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

13442}
13443
13444function score(node) {
13445 var a = node._,
13446 b = node.next._,
13447 ab = a.r + b.r,
13448 dx = (a.x * b.r + b.x * a.r) / ab,
13449 dy = (a.y * b.r + b.y * a.r) / ab;
13450 return dx * dx + dy * dy;
13451}
13452
13453function Node(circle) {
13454 this._ = circle;

Callers 2

insertSortedFunction · 0.85
packSiblingsRandomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected