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

Function flatArray

docs/tests/v3/es6/js/sanddance-test-es6.js:87763–87772  ·  view source on GitHub ↗
(points, fx, fy, that)

Source from the content-addressed store, hash-verified

87761}
87762exports.default = Delaunay;
87763function flatArray(points, fx, fy, that) {
87764 const n = points.length;
87765 const array = new Float64Array(n * 2);
87766 for(let i = 0; i < n; ++i){
87767 const p = points[i];
87768 array[i * 2] = fx.call(that, p, i, points);
87769 array[i * 2 + 1] = fy.call(that, p, i, points);
87770 }
87771 return array;
87772}
87773function* flatIterable(points, fx, fy, that) {
87774 let i = 0;
87775 for (const p of points){

Callers 1

fromMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected