The array of points to be simplified. Each point is represented as a pair of numbers: [pos, val].
The maximum allowed perpendicular distance from a point to the line segment.
The number of decimal places to which point values should be rounded.
The simplified and rounded points, or null if the input was null.
The function first checks if the input points are null. If they are, it returns null. If they are not null, the function applies the Ramer-Douglas-Peucker algorithm to the points using the specified tolerance. Then it rounds the x and y values of the resulting points to the specified number of decimal places. The x values are always rounded to at least 2 decimal places because they are represented as a percentage.
Generated using TypeDoc
Simplifies a given set of points using the Ramer-Douglas-Peucker algorithm and rounds the x and y values of the resulting points.