@@ -20,7 +20,7 @@ Check out [v3](https://github.com/uber/h3-go/tree/v3.7.1) or checkout the git ta
20
20
21
21
** Migrating from v3?**
22
22
23
- Check out [ v3 to v4 migration guide] ( https://h3geo.org/docs/next/ library/migrating-3.x/ ) .
23
+ Check out [ v3 to v4 migration guide] ( https://h3geo.org/docs/library/migrating-3.x ) .
24
24
There have been no breaking changes to the format of H3 indexes. Indexes
25
25
generated by older versions can be parsed in v4, and vice-versa.
26
26
@@ -39,7 +39,7 @@ be built. Go should do the right thing when including this library:
39
39
> implies the "cgo" build constraint, as though the file also said "// +build
40
40
> cgo". Therefore, if cgo is disabled, files that import "C" will not be built by
41
41
> the go tool. (For more about build constraints see
42
- > https://golang.org/pkg/go/build/#hdr-Build_Constraints ).
42
+ > < https://golang.org/pkg/go/build/#hdr-Build_Constraints > ).
43
43
44
44
If you see errors/warnings like _ "build constraints exclude all Go files..."_ ,
45
45
then the ` cgo ` build constraint is likely disabled; try setting ` CGO_ENABLED=1 `
@@ -57,21 +57,22 @@ go get github.com/uber/h3-go/v4
57
57
import " github.com/uber/h3-go/v4"
58
58
59
59
func ExampleLatLngToCell () {
60
- latLng := h3.NewLatLng (37.775938728915946 , -122.41795063018799 )
61
- resolution := 9 // between 0 (biggest cell) and 15 (smallest cell)
60
+ latLng := h3.NewLatLng (37.775938728915946 , -122.41795063018799 )
61
+ resolution := 9 // between 0 (biggest cell) and 15 (smallest cell)
62
62
63
- cell := h3.LatLngToCell (latLng, resolution)
63
+ cell := h3.LatLngToCell (latLng, resolution)
64
64
65
- fmt.Printf (" %s " , cell)
66
- // Output:
67
- // 8928308280fffff
65
+ fmt.Printf (" %s " , cell)
66
+ // Output:
67
+ // 8928308280fffff
68
68
}
69
69
70
70
```
71
71
72
- # C API
72
+ # C API
73
73
74
74
## Notes
75
+
75
76
* ` LatLng ` returns ` Lat ` and ` Lng ` as degrees, instead of radians.
76
77
* H3 C API function prefixes of ` get ` have been dropped in support of Golang's
77
78
` Getter ` [ naming style] ( https://golang.org/doc/effective_go.html#Getters ) .
@@ -96,7 +97,7 @@ func ExampleLatLngToCell() {
96
97
| ` getHexagonAreaAvg ` | ` HexagonAreaAvg* (3/3) ` |
97
98
| ` cellArea ` | ` CellArea* (3/3) ` |
98
99
| ` getHexagonEdgeLengthAvg ` | ` HexagonEdgeLengthAvg* (2/2) ` |
99
- | ` exactEdgeLength ` | ` ExactEdgeLength * (3/3)` |
100
+ | ` exactEdgeLength ` | ` EdgeLength * (3/3)` |
100
101
| ` getNumCells ` | ` NumCells ` |
101
102
| ` getRes0Cells ` | ` Res0Cells ` |
102
103
| ` getPentagons ` | ` Pentagons ` |
0 commit comments