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

Method Point

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

Point returns the center of the s2 cell on the sphere as a Point. The maximum directional error in Point (compared to the exact mathematical result) is 1.5 * machineEpsilon64 radians, and the maximum length error is 2 * machineEpsilon64 (the same as Normalize).

()

Source from the content-addressed store, hash-verified

377// mathematical result) is 1.5 * machineEpsilon64 radians, and the maximum length
378// error is 2 * machineEpsilon64 (the same as Normalize).
379func (ci CellID) Point() Point { return Point{ci.rawPoint().Normalize()} }
380
381// LatLng returns the center of the s2 cell on the sphere as a LatLng.
382func (ci CellID) LatLng() LatLng { return LatLngFromPoint(Point{ci.rawPoint()}) }

Callers 15

TestCapContainsCellFunction · 0.80
TestCapIntersectsCellFunction · 0.80
TestPaddedCellMethodsFunction · 0.80
TestXYZToFaceSiTiFunction · 0.80
TestXYZFaceSiTiRoundtripFunction · 0.80
makeSnappedPointsFunction · 0.80
TestPointsCompressionFunction · 0.80
loop_test.goFile · 0.80
CenterMethod · 0.80

Calls 2

rawPointMethod · 0.95
NormalizeMethod · 0.45

Tested by 14

TestCapContainsCellFunction · 0.64
TestCapIntersectsCellFunction · 0.64
TestPaddedCellMethodsFunction · 0.64
TestXYZToFaceSiTiFunction · 0.64
TestXYZFaceSiTiRoundtripFunction · 0.64
makeSnappedPointsFunction · 0.64
TestPointsCompressionFunction · 0.64
testCellChildrenFunction · 0.64
validateInteriorFunction · 0.64