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

Function encloseBasis2

external/.d3.js:13374–13384  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

13372}
13373
13374function encloseBasis2(a, b) {
13375 var x1 = a.x, y1 = a.y, r1 = a.r,
13376 x2 = b.x, y2 = b.y, r2 = b.r,
13377 x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,
13378 l = Math.sqrt(x21 * x21 + y21 * y21);
13379 return {
13380 x: (x1 + x2 + x21 / l * r21) / 2,
13381 y: (y1 + y2 + y21 / l * r21) / 2,
13382 r: (l + r1 + r2) / 2
13383 };
13384}
13385
13386function encloseBasis3(a, b, c) {
13387 var x1 = a.x, y1 = a.y, r1 = a.r,

Callers 2

extendBasisFunction · 0.85
encloseBasisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected