MCPcopy Create free account
hub / github.com/idank/explainshell / d3_transformNormalize

Function d3_transformNormalize

explainshell/web/static/js/d3.v3.js:4663–4670  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

4661 return a[0] * b[0] + a[1] * b[1];
4662 }
4663 function d3_transformNormalize(a) {
4664 var k = Math.sqrt(d3_transformDot(a, a));
4665 if (k) {
4666 a[0] /= k;
4667 a[1] /= k;
4668 }
4669 return k;
4670 }
4671 function d3_transformCombine(a, b, k) {
4672 a[0] += k * b[0];
4673 a[1] += k * b[1];

Callers 1

d3_transformFunction · 0.85

Calls 1

d3_transformDotFunction · 0.85

Tested by

no test coverage detected