(positions, size, startIndex, endIndex)
| 102541 | } |
| 102542 | } |
| 102543 | function wrapLongitudesForShortestPath(positions, size, startIndex, endIndex) { |
| 102544 | let prevLng = positions[0]; |
| 102545 | let lng; |
| 102546 | for(let i = startIndex; i < endIndex; i += size){ |
| 102547 | lng = positions[i]; |
| 102548 | const delta = lng - prevLng; |
| 102549 | if (delta > 180 || delta < -180) lng -= Math.round(delta / 360) * 360; |
| 102550 | positions[i] = prevLng = lng; |
| 102551 | } |
| 102552 | } |
| 102553 | function shiftLongitudesIntoRange(positions, size) { |
| 102554 | let refLng; |
| 102555 | const pointCount = positions.length / size; |
no outgoing calls
no test coverage detected