halfrost / Halfrost-Field

✍🏻 这里是写博客的地方 —— Halfrost-Field 冰霜之地

Home Page:https://halfrost.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请教一个关于cell id的问题

wushuangxiaoyu opened this issue · comments

commented

你好
在看cell_id 源码的时候看到这样一个代码,不求甚解,盼大佬解答:
image
zhe'g
这个next 就是把最小的精度位置直接+1了
希尔伯特的最小单元不是有4种u型么。。按理说 +1 不一定是cellId的next啊
那为啥这里是这样处理的呢?

这里 + 1 是在 U 型上变换到了下一个单元,计算 cellid 是在 S2CellId 那个函数里面计算的。