Skip to content

Function: cleanPolygon() ​

ts
function cleanPolygon(p, tol?): Polygon;

Remove consecutive duplicate vertices; return [] if the result has no area.

Parameters ​

ParameterTypeDefault value
pPolygonundefined
tolnumber1e-9

Returns ​

Polygon

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).