Polygon.compare() method
Suitable for use in Array.sort.
Signature:
static compare(a: Polygon, b: Polygon): (-1 | 0 | 1);
Parameters
Parameter |
Type |
Description |
---|---|---|
a | ||
b |
(-1 | 0 | 1)
Remarks
Polygons are sorted largest first (by area), falling back to the combined X+Y position of the min/min corner of the bounding box sorted min/min to max/max.