The X position of point (px, py).
The Y position of point (px, py)
The X position of the line segment's vertex A.
The Y position of the line segment's vertex A.
The X position of the line segment's vertex B.
The Y position of the line segment's vertex B.
The distance squared from the point (px, py) to line segment AB.
Simplify a path according to an allowed gap.
The simplified path vertices are the same instances as the one in the source. They must be cloned to make them truly independent from each other.
The path to simplify.
The maximum distance the edge of the contour may deviate from the source geometry.
The simplified path.
It avoids allocations.
Generated using TypeDoc
Returns the distance squared from the point to the line segment.
Behavior is undefined if the the closest distance is outside the line segment.