(points, fx, fy, that)
| 8095 | } |
| 8096 | |
| 8097 | function 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 | |
| 8108 | function* flatIterable(points, fx, fy, that) { |
| 8109 | let i = 0; |