MCPcopy Create free account
hub / github.com/microsoft/SandDance / flatArray

Function flatArray

docs/tests/v2/es6/js/sanddance.js:124998–125009  ·  view source on GitHub ↗
(points, fx, fy, that)

Source from the content-addressed store, hash-verified

124996};
124997
124998function flatArray(points, fx, fy, that) {
124999 const n = points.length;
125000 const array = new Float64Array(n * 2);
125001
125002 for (let i = 0; i < n; ++i) {
125003 const p = points[i];
125004 array[i * 2] = fx.call(that, p, i, points);
125005 array[i * 2 + 1] = fy.call(that, p, i, points);
125006 }
125007
125008 return array;
125009}
125010
125011function* flatIterable(points, fx, fy, that) {
125012 let i = 0;

Callers 1

sanddance.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected