(points, options)
| 101653 | if (!isClosedEx) visitor(points[endPointIndex], points[endPointIndex + 1], points[start], points[start + 1], numPoints - 1, 0); |
| 101654 | } |
| 101655 | function reversePolygon(points, options) { |
| 101656 | const { start =0 , end =points.length , size =2 } = options; |
| 101657 | const numPoints = (end - start) / size; |
| 101658 | const numSwaps = Math.floor(numPoints / 2); |
| 101659 | for(let i = 0; i < numSwaps; ++i){ |
| 101660 | const b1 = start + i * size; |
| 101661 | const b2 = start + (numPoints - 1 - i) * size; |
| 101662 | for(let j = 0; j < size; ++j){ |
| 101663 | const tmp = points[b1 + j]; |
| 101664 | points[b1 + j] = points[b2 + j]; |
| 101665 | points[b2 + j] = tmp; |
| 101666 | } |
| 101667 | } |
| 101668 | } |
| 101669 | function modifyPolygonWindingDirectionPoints(points, direction, options = {}) { |
| 101670 | const currentDirection = getPolygonWindingDirectionPoints(points, options); |
| 101671 | if (currentDirection !== direction) { |
no outgoing calls
no test coverage detected