source: node_modules/d3-interpolate/src/numberArray.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 332 bytes
RevLine 
[e4c61dd]1export default function(a, b) {
2 if (!b) b = [];
3 var n = a ? Math.min(b.length, a.length) : 0,
4 c = b.slice(),
5 i;
6 return function(t) {
7 for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
8 return c;
9 };
10}
11
12export function isNumberArray(x) {
13 return ArrayBuffer.isView(x) && !(x instanceof DataView);
14}
Note: See TracBrowser for help on using the repository browser.