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

Method rawPoint

s2/cellid.go:519–522  ·  view source on GitHub ↗

rawPoint returns an unnormalized r3 vector from the origin through the center of the s2 cell on the sphere.

()

Source from the content-addressed store, hash-verified

517// rawPoint returns an unnormalized r3 vector from the origin through the center
518// of the s2 cell on the sphere.
519func (ci CellID) rawPoint() r3.Vector {
520 face, si, ti := ci.faceSiTi()
521 return faceUVToXYZ(face, stToUV((0.5/MaxSize)*float64(si)), stToUV((0.5/MaxSize)*float64(ti)))
522}
523
524// faceSiTi returns the Face/Si/Ti coordinates of the center of the cell.
525func (ci CellID) faceSiTi() (face int, si, ti uint32) {

Callers 5

PointMethod · 0.95
LatLngMethod · 0.95
CenterMethod · 0.80
TestCellIDContinuityFunction · 0.80
IntersectsCellMethod · 0.80

Calls 3

faceSiTiMethod · 0.95
faceUVToXYZFunction · 0.85
stToUVFunction · 0.85

Tested by 1

TestCellIDContinuityFunction · 0.64