Initial commit
This commit is contained in:
6
node_modules/d3-array/src/cumsum.js
generated
vendored
Normal file
6
node_modules/d3-array/src/cumsum.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export default function cumsum(values, valueof) {
|
||||
var sum = 0, index = 0;
|
||||
return Float64Array.from(values, valueof === undefined
|
||||
? v => (sum += +v || 0)
|
||||
: v => (sum += +valueof(v, index++, values) || 0));
|
||||
}
|
||||
Reference in New Issue
Block a user