segment to the path at
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 are inserted at
index as a group, in the order they appear in the provided array.
The function does not return anything.