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

Function OriginPoint

s2/point.go:67–69  ·  view source on GitHub ↗

OriginPoint returns a unique "origin" on the sphere for operations that need a fixed reference point. In particular, this is the "point at infinity" used for point-in-polygon testing (by counting the number of edge crossings). It should *not* be a point that is commonly used in edge tests in order

()

Source from the content-addressed store, hash-verified

65// north and south poles). It should also not be on the boundary of any
66// low-level S2Cell for the same reason.
67func OriginPoint() Point {
68 return Point{r3.Vector{X: -0.0099994664350250197, Y: 0.0025924542609324121, Z: 0.99994664350250195}}
69}
70
71// PointCross returns a Point that is orthogonal to both p and op. This is similar to
72// p.Cross(op) (the true cross product) except that it does a better job of

Callers 13

TestEncodeDecodeFunction · 0.85
PointFromCoordsFunction · 0.85
TestPolygonShapeFunction · 0.85
TestColFunction · 0.85
TestRowFunction · 0.85
OriginReferencePointFunction · 0.85
TestEdgeCrosserCrossingsFunction · 0.85
TestOriginPointFunction · 0.85

Calls

no outgoing calls

Tested by 10

TestEncodeDecodeFunction · 0.68
TestPolygonShapeFunction · 0.68
TestColFunction · 0.68
TestRowFunction · 0.68
TestEdgeCrosserCrossingsFunction · 0.68
TestOriginPointFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…