UNPKG

468 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = _default;
7exports.isNumberArray = isNumberArray;
8
9function _default(a, b) {
10 if (!b) b = [];
11 var n = a ? Math.min(b.length, a.length) : 0,
12 c = b.slice(),
13 i;
14 return function (t) {
15 for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
16
17 return c;
18 };
19}
20
21function isNumberArray(x) {
22 return ArrayBuffer.isView(x) && !(x instanceof DataView);
23}
\No newline at end of file