MCPcopy
hub / github.com/golang/geo / ChildBeginAtLevel

Method ChildBeginAtLevel

s2/cellid.go:397–399  ·  view source on GitHub ↗

ChildBeginAtLevel returns the first cell in a traversal of children a given level deeper than this cell, in Hilbert curve order. The given level must be no smaller than the cell's level. See ChildBegin for example use.

(level int)

Source from the content-addressed store, hash-verified

395// Hilbert curve order. The given level must be no smaller than the cell's level.
396// See ChildBegin for example use.
397func (ci CellID) ChildBeginAtLevel(level int) CellID {
398 return CellID(uint64(ci) - ci.lsb() + lsbForLevel(level))
399}
400
401// ChildEnd returns the first cell after a traversal of the children of this cell in Hilbert curve order.
402// The returned cell may be invalid.

Callers 15

BuildMethod · 0.80
TestCellIDAllNeighborsFunction · 0.80
TestCellIDWrappingFunction · 0.80
TestCellIDAdvanceFunction · 0.80
TestCellIDContinuityFunction · 0.80
TestLoopContainsPointFunction · 0.80
newTrackerFunction · 0.80
TestCellIntersectsCellFunction · 0.80
TestCellContainsCellFunction · 0.80

Calls 3

lsbMethod · 0.95
CellIDTypeAlias · 0.85
lsbForLevelFunction · 0.85

Tested by 15

TestCellIDAllNeighborsFunction · 0.64
TestCellIDWrappingFunction · 0.64
TestCellIDAdvanceFunction · 0.64
TestCellIDContinuityFunction · 0.64
TestLoopContainsPointFunction · 0.64
TestCellIntersectsCellFunction · 0.64
TestCellContainsCellFunction · 0.64
TestCellCapBoundFunction · 0.64
TestCellContainsPointFunction · 0.64