Skip to content

Commit

Permalink
adding docstring to make behavior clear
Browse files Browse the repository at this point in the history
  • Loading branch information
zachcoleman committed Aug 1, 2024
1 parent 98da50d commit 1bf2e6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions h3.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ func (p GeoPolygon) Cells(resolution int) []Cell {
// describing the outline(s) of a set of hexagons. Polygon outlines will follow
// GeoJSON MultiPolygon order: Each polygon will have one outer loop, which is first in
// the list, followed by any holes.
//
// It is expected that all hexagons in the set have the same resolution and that the set
// contains no duplicates. Behavior is undefined if duplicates or multiple resolutions are
// present, and the algorithm may produce unexpected or invalid output.
func CellsToMultiPolygon(cells []Cell) []GeoPolygon {
if len(cells) == 0 {
return nil
Expand Down

0 comments on commit 1bf2e6e

Please sign in to comment.