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

Function TestCapCellUnionBoundLevel1Radius

s2/cap_test.go:217–225  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

215}
216
217func TestCapCellUnionBoundLevel1Radius(t *testing.T) {
218 // Check that a cap whose radius is approximately the width of a level 1
219 // Cell can be covered by only 3 faces.
220 c := CapFromCenterAngle(PointFromCoords(1, 1, 1), s1.Angle(MinWidthMetric.Value(1)))
221 covering := c.CellUnionBound()
222 if len(covering) != 3 {
223 t.Errorf("a cap with radius of a level 1 cell should be covered by 3 faces, got %d", len(covering))
224 }
225}
226
227func TestCapExpanded(t *testing.T) {
228 cap50 := CapFromCenterAngle(xAxisPt, 50.0*s1.Degree)

Callers

nothing calls this directly

Calls 5

AngleTypeAlias · 0.92
CapFromCenterAngleFunction · 0.85
PointFromCoordsFunction · 0.85
ValueMethod · 0.80
CellUnionBoundMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…