Skip to content

Commit

Permalink
Update docs and CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Rabinowitz committed Jan 19, 2023
1 parent 31cec04 commit ed23c71
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ All notable changes to this project will be documented in this file. This librar

## [Unreleased]
### Added
- `cellToChildPos` and `childPosToCell` functions. (#170)
- Add `cellToChildPos`, `childPosToCell`, and `cellToChildrenSize` functions. (#170)

### Changed
- Updated the core library to `v4.1.0` (#170)

### Fixed
- Patch libh3 bundles to check for `typeof document != "undefined"` before accessing `document`. This allows h3-js to be used in a Web Worker and React Native (#169)
- Fix H3Index type hints for `cellToBoundary`, `cellArea`, `edgeLength` (#171)
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const coordinates = h3.cellsToMultiPolygon(hexagons, true);
* [.cellToBoundary(h3Index, [formatAsGeoJson])](#module_h3.cellToBoundary) ⇒ <code>Array.&lt;CoordPair&gt;</code>
* [.cellToParent(h3Index, res)](#module_h3.cellToParent) ⇒ <code>H3Index</code>
* [.cellToChildren(h3Index, res)](#module_h3.cellToChildren) ⇒ <code>Array.&lt;H3Index&gt;</code>
* [.cellToChildrenSize(h3Index, res)](#module_h3.cellToChildrenSize) ⇒ <code>number</code>
* [.cellToCenterChild(h3Index, res)](#module_h3.cellToCenterChild) ⇒ <code>H3Index</code>
* [.cellToChildPos(h3Index, parentRes)](#module_h3.cellToChildPos) ⇒ <code>number</code>
* [.childPosToCell(childPos, h3Index, childRes)](#module_h3.childPosToCell) ⇒ <code>H3Index</code>
Expand Down Expand Up @@ -391,6 +392,25 @@ Get the children/descendents of the given hexagon at a particular resolution
| res | <code>number</code> | Resolution of hexagons to return |


* * *

<a name="module_h3.cellToChildrenSize"></a>

### h3.cellToChildrenSize(h3Index, res) ⇒ <code>number</code>
Get the number of children for a cell at a given resolution

**Returns**: <code>number</code> - Number of children at res for the given cell
**Throws**:

- <code>H3Error</code> If cell or parentRes are invalid


| Param | Type | Description |
| --- | --- | --- |
| h3Index | <code>H3IndexInput</code> | H3 index to get child count for |
| res | <code>number</code> | Child resolution |


* * *

<a name="module_h3.cellToCenterChild"></a>
Expand Down

0 comments on commit ed23c71

Please sign in to comment.