(points, fx, fy, that)
| 124996 | }; |
| 124997 | |
| 124998 | function 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 | |
| 125011 | function* flatIterable(points, fx, fy, that) { |
| 125012 | let i = 0; |