| 102426 | return out; |
| 102427 | } |
| 102428 | function moveToNeighborCell(cell, gridResolution, edge) { |
| 102429 | if (edge & 8) { |
| 102430 | cell[1] += gridResolution; |
| 102431 | cell[3] += gridResolution; |
| 102432 | } else if (edge & 4) { |
| 102433 | cell[1] -= gridResolution; |
| 102434 | cell[3] -= gridResolution; |
| 102435 | } else if (edge & 2) { |
| 102436 | cell[0] += gridResolution; |
| 102437 | cell[2] += gridResolution; |
| 102438 | } else if (edge & 1) { |
| 102439 | cell[0] -= gridResolution; |
| 102440 | cell[2] -= gridResolution; |
| 102441 | } |
| 102442 | } |
| 102443 | function getBoundingBox(positions, size, endIndex, out) { |
| 102444 | let minX = Infinity; |
| 102445 | let maxX = -Infinity; |