simplify

fun simplify(points: List<Vector2>, epsilon: Double): List<Vector2>

The Ramer–Douglas–Peucker algorithm, is an algorithm that decimates a curve composed of line segments to a similar curve with fewer points.

When the epsilon is less than the distance between two points, simplify is applied recursively.

Author

Edwin Jakobs

Parameters

epsilon

Maximum distance two points can have without simplifying them.