feat: Implement gridRing#1011
feat: Implement gridRing#1011isaacbrodsky merged 1 commit intouber:masterfrom justinhwang:justinhwang/gridring
Conversation
|
Not quite sure why were getting these errors when the test file has: also my first time writing in C so any help is appreciated! |
The issue is because the declaration needs to be added to |
|
Thanks for this contribution! I will take a look in more detail. If you're comfortable, could you also add this function to |
Ah I didn't notice that
Would prefer if someone could help me do that in a followup, thank you :) |
This commit introduces a new public API function,
gridRing, toretrieve H3 cells located at an exact grid distance
kfrom an origincell, forming a "hollow" ring.
The implementation mirrors implementation of
gridDiskDistanceswherein we first attempt to use the unsafe version. If the unsafe
version fails, we fallback to
_gridRingInternal._gridRingInternalutilizes_gridDiskDistancesInternalto get allcells up to distance
k, then filters the output to only include thoseat exactly
k.