(positions, size, startIndex, endIndex)
| 102516 | return parts; |
| 102517 | } |
| 102518 | function findSplitIndex(positions, size, startIndex, endIndex) { |
| 102519 | let maxLat = -1; |
| 102520 | let pointIndex = -1; |
| 102521 | for(let i = startIndex + 1; i < endIndex; i += size){ |
| 102522 | const lat = Math.abs(positions[i]); |
| 102523 | if (lat > maxLat) { |
| 102524 | maxLat = lat; |
| 102525 | pointIndex = i - 1; |
| 102526 | } |
| 102527 | } |
| 102528 | return pointIndex; |
| 102529 | } |
| 102530 | function insertPoleVertices(positions, size, startIndex, endIndex, maxLatitude = DEFAULT_MAX_LATITUDE) { |
| 102531 | const firstLng = positions[startIndex]; |
| 102532 | const lastLng = positions[endIndex - size]; |
no outgoing calls
no test coverage detected