    path.replaceSegment(index, segment)

Replace the path segment at `index` with the `segment` provided.

Negative indices are accepted; they instruct the algorithm to start looking from the end of the segments array.

Also accepts an array of segments as an argument. The segments replace the segment at `index` as a group, in the order they appear in the provided array.

The function does not return anything.