Ramer-Douglas-Peucker thinning. Keeps the first and last points and, between
them, only those that pull the stroke more than epsilonPx away from the
chord of their kept neighbours; every dropped point lies within epsilonPx
of the returned polyline. Kept points come back at their exact input
coordinates, in input order. An epsilonPx that is not positive returns a
copy. The result never aliases its input, so a caller may mutate it.
Ramer-Douglas-Peucker thinning. Keeps the first and last points and, between them, only those that pull the stroke more than
epsilonPxaway from the chord of their kept neighbours; every dropped point lies withinepsilonPxof the returned polyline. Kept points come back at their exact input coordinates, in input order. AnepsilonPxthat is not positive returns a copy. The result never aliases its input, so a caller may mutate it.