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

Function numberArray

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

Source from the content-addressed store, hash-verified

3590var rgbBasisClosed = rgbSpline(basisClosed$1);
3591
3592function numberArray(a, b) {
3593 if (!b) b = [];
3594 var n = a ? Math.min(b.length, a.length) : 0,
3595 c = b.slice(),
3596 i;
3597 return function(t) {
3598 for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
3599 return c;
3600 };
3601}
3602
3603function isNumberArray(x) {
3604 return ArrayBuffer.isView(x) && !(x instanceof DataView);

Callers

nothing calls this directly

Calls 2

minMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected