MCPcopy Create free account
hub / github.com/jipegit/OSXAuditor / d3_transformNormalize

Function d3_transformNormalize

d3-3.2.8/d3.js:5233–5240  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

5231 return a[0] * b[0] + a[1] * b[1];
5232 }
5233 function d3_transformNormalize(a) {
5234 var k = Math.sqrt(d3_transformDot(a, a));
5235 if (k) {
5236 a[0] /= k;
5237 a[1] /= k;
5238 }
5239 return k;
5240 }
5241 function d3_transformCombine(a, b, k) {
5242 a[0] += k * b[0];
5243 a[1] += k * b[1];

Callers 1

d3_transformFunction · 0.85

Calls 1

d3_transformDotFunction · 0.85

Tested by

no test coverage detected