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

Function parsePoint

s2/textformat_test.go:66–73  ·  view source on GitHub ↗

parsePoint returns a Point from the given string, or the origin if the string was invalid. If more than one value is given, only the first is used.

(s string)

Source from the content-addressed store, hash-verified

64// parsePoint returns a Point from the given string, or the origin if the
65// string was invalid. If more than one value is given, only the first is used.
66func parsePoint(s string) Point {
67 p := parsePoints(s)
68 if len(p) > 0 {
69 return p[0]
70 }
71
72 return Point{r3.Vector{X: 0, Y: 0, Z: 0}}
73}
74
75// pointToString returns a string representation suitable for reconstruction
76// by the parsePoint method.

Calls 1

parsePointsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…