File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -495,8 +495,10 @@ func (ci *CellID) decode(d *decoder) {
495
495
// TODO: the methods below are not exported yet. Settle on the entire API design
496
496
// before doing this. Do we want to mirror the C++ one as closely as possible?
497
497
498
- // distanceFromBegin returns the number of steps that this cell is from the first
499
- // node in the S2 hierarchy at our level. (i.e., FromFace(0).ChildBeginAtLevel(ci.Level())).
498
+ // distanceFromBegin returns the number of steps along the Hilbert curve that
499
+ // this cell is from the first node in the S2 hierarchy at our level. (i.e.,
500
+ // FromFace(0).ChildBeginAtLevel(ci.Level())). This is analogous to Pos(), but
501
+ // for this cell's level.
500
502
// The return value is always non-negative.
501
503
func (ci CellID ) distanceFromBegin () int64 {
502
504
return int64 (ci >> uint64 (2 * (maxLevel - ci .Level ())+ 1 ))
You can’t perform that action at this time.
0 commit comments