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

Function flatArray

external/.d3.js:8097–8106  ·  view source on GitHub ↗
(points, fx, fy, that)

Source from the content-addressed store, hash-verified

8095}
8096
8097function flatArray(points, fx, fy, that) {
8098 const n = points.length;
8099 const array = new Float64Array(n * 2);
8100 for (let i = 0; i < n; ++i) {
8101 const p = points[i];
8102 array[i * 2] = fx.call(that, p, i, points);
8103 array[i * 2 + 1] = fy.call(that, p, i, points);
8104 }
8105 return array;
8106}
8107
8108function* flatIterable(points, fx, fy, that) {
8109 let i = 0;

Callers 1

fromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected