Skip to content

Commit 2bbcbb7

Browse files
committed
update ref
1 parent 9cb06f7 commit 2bbcbb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+265
-266
lines changed

r2/rect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"math"
2020

21-
"github.com/golang/geo/r1"
21+
"github.com/philiphil/geo/r1"
2222
)
2323

2424
// Point represents a point in ℝ².

r2/rect_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"reflect"
2323
"testing"
2424

25-
"github.com/golang/geo/r1"
25+
"github.com/philiphil/geo/r1"
2626
)
2727

2828
var (

r3/vector.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"math"
2020

21-
"github.com/golang/geo/s1"
21+
"github.com/philiphil/geo/s1"
2222
)
2323

2424
// Vector represents a point in ℝ³.
@@ -146,9 +146,9 @@ func (v Vector) SmallestComponent() Axis {
146146

147147
// Cmp compares v and ov lexicographically and returns:
148148
//
149-
// -1 if v < ov
150-
// 0 if v == ov
151-
// +1 if v > ov
149+
// -1 if v < ov
150+
// 0 if v == ov
151+
// +1 if v > ov
152152
//
153153
// This method is based on C++'s std::lexicographical_compare. Two entities
154154
// are compared element by element with the given operator. The first mismatch

s1/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"math"
2020

21-
"github.com/golang/geo/s1"
21+
"github.com/philiphil/geo/s1"
2222
)
2323

2424
func ExampleInterval_DirectedHausdorffDistance() {

s2/cap.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"io"
2020
"math"
2121

22-
"github.com/golang/geo/r1"
23-
"github.com/golang/geo/s1"
22+
"github.com/philiphil/geo/r1"
23+
"github.com/philiphil/geo/s1"
2424
)
2525

2626
var (
@@ -52,10 +52,10 @@ var (
5252
// radius (r), the maximum chord length from the cap's center (d), and the
5353
// radius of cap's base (a).
5454
//
55-
// h = 1 - cos(r)
56-
// = 2 * sin^2(r/2)
57-
// d^2 = 2 * h
58-
// = a^2 + h^2
55+
// h = 1 - cos(r)
56+
// = 2 * sin^2(r/2)
57+
// d^2 = 2 * h
58+
// = a^2 + h^2
5959
//
6060
// The zero value of Cap is an invalid cap. Use EmptyCap to get a valid empty cap.
6161
type Cap struct {

s2/cap_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"math"
1919
"testing"
2020

21-
"github.com/golang/geo/r3"
22-
"github.com/golang/geo/s1"
21+
"github.com/philiphil/geo/r3"
22+
"github.com/philiphil/geo/s1"
2323
)
2424

2525
const (

s2/cell.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import (
1818
"io"
1919
"math"
2020

21-
"github.com/golang/geo/r1"
22-
"github.com/golang/geo/r2"
23-
"github.com/golang/geo/r3"
24-
"github.com/golang/geo/s1"
21+
"github.com/philiphil/geo/r1"
22+
"github.com/philiphil/geo/r2"
23+
"github.com/philiphil/geo/r3"
24+
"github.com/philiphil/geo/s1"
2525
)
2626

2727
// Cell is an S2 region object that represents a cell. Unlike CellIDs,

s2/cell_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"testing"
2020
"unsafe"
2121

22-
"github.com/golang/geo/r2"
23-
"github.com/golang/geo/s1"
22+
"github.com/philiphil/geo/r2"
23+
"github.com/philiphil/geo/s1"
2424
)
2525

2626
// maxCellSize is the upper bounds on the number of bytes we want the Cell object to ever be.

s2/cellid.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323
"strconv"
2424
"strings"
2525

26-
"github.com/golang/geo/r1"
27-
"github.com/golang/geo/r2"
28-
"github.com/golang/geo/r3"
29-
"github.com/golang/geo/s1"
26+
"github.com/philiphil/geo/r1"
27+
"github.com/philiphil/geo/r2"
28+
"github.com/philiphil/geo/r3"
29+
"github.com/philiphil/geo/s1"
3030
)
3131

3232
// CellID uniquely identifies a cell in the S2 cell decomposition.
@@ -39,15 +39,15 @@ import (
3939
// Sequentially increasing cell IDs follow a continuous space-filling curve
4040
// over the entire sphere. They have the following properties:
4141
//
42-
// - The ID of a cell at level k consists of a 3-bit face number followed
43-
// by k bit pairs that recursively select one of the four children of
44-
// each cell. The next bit is always 1, and all other bits are 0.
45-
// Therefore, the level of a cell is determined by the position of its
46-
// lowest-numbered bit that is turned on (for a cell at level k, this
47-
// position is 2 * (maxLevel - k)).
42+
// - The ID of a cell at level k consists of a 3-bit face number followed
43+
// by k bit pairs that recursively select one of the four children of
44+
// each cell. The next bit is always 1, and all other bits are 0.
45+
// Therefore, the level of a cell is determined by the position of its
46+
// lowest-numbered bit that is turned on (for a cell at level k, this
47+
// position is 2 * (maxLevel - k)).
4848
//
49-
// - The ID of a parent cell is at the midpoint of the range of IDs spanned
50-
// by its children (or by its descendants at any level).
49+
// - The ID of a parent cell is at the midpoint of the range of IDs spanned
50+
// by its children (or by its descendants at any level).
5151
//
5252
// Leaf cells are often used to represent points on the unit sphere, and
5353
// this type provides methods for converting directly between these two
@@ -373,9 +373,9 @@ func (ci CellID) LatLng() LatLng { return LatLngFromPoint(Point{ci.rawPoint()})
373373

374374
// ChildBegin returns the first child in a traversal of the children of this cell, in Hilbert curve order.
375375
//
376-
// for ci := c.ChildBegin(); ci != c.ChildEnd(); ci = ci.Next() {
377-
// ...
378-
// }
376+
// for ci := c.ChildBegin(); ci != c.ChildEnd(); ci = ci.Next() {
377+
// ...
378+
// }
379379
func (ci CellID) ChildBegin() CellID {
380380
ol := ci.lsb()
381381
return CellID(uint64(ci) - ol + ol>>2)
@@ -644,7 +644,7 @@ func stToIJ(s float64) int {
644644
// s2.CellIDs are considered to be closed sets. The returned cell will
645645
// always contain the given point, i.e.
646646
//
647-
// CellFromPoint(p).ContainsPoint(p)
647+
// CellFromPoint(p).ContainsPoint(p)
648648
//
649649
// is always true.
650650
func cellIDFromPoint(p Point) CellID {
@@ -839,19 +839,19 @@ func expandEndpoint(u, maxV, sinDist float64) float64 {
839839
// it contains all points within 5km of the original cell. You can then
840840
// test whether a point lies within the expanded bounds like this:
841841
//
842-
// if u, v, ok := faceXYZtoUV(face, point); ok && bound.ContainsPoint(r2.Point{u,v}) { ... }
842+
// if u, v, ok := faceXYZtoUV(face, point); ok && bound.ContainsPoint(r2.Point{u,v}) { ... }
843843
//
844844
// Limitations:
845845
//
846-
// - Because the rectangle is drawn on one of the six cube-face planes
847-
// (i.e., {x,y,z} = +/-1), it can cover at most one hemisphere. This
848-
// limits the maximum amount that a rectangle can be expanded. For
849-
// example, CellID bounds can be expanded safely by at most 45 degrees
850-
// (about 5000 km on the Earth's surface).
846+
// - Because the rectangle is drawn on one of the six cube-face planes
847+
// (i.e., {x,y,z} = +/-1), it can cover at most one hemisphere. This
848+
// limits the maximum amount that a rectangle can be expanded. For
849+
// example, CellID bounds can be expanded safely by at most 45 degrees
850+
// (about 5000 km on the Earth's surface).
851851
//
852-
// - The implementation is not exact for negative distances. The resulting
853-
// rectangle will exclude all points within the given distance of the
854-
// boundary but may be slightly smaller than necessary.
852+
// - The implementation is not exact for negative distances. The resulting
853+
// rectangle will exclude all points within the given distance of the
854+
// boundary but may be slightly smaller than necessary.
855855
func expandedByDistanceUV(uv r2.Rect, distance s1.Angle) r2.Rect {
856856
// Expand each of the four sides of the rectangle just enough to include all
857857
// points within the given distance of that side. (The rectangle may be
@@ -872,7 +872,7 @@ func expandedByDistanceUV(uv r2.Rect, distance s1.Angle) r2.Rect {
872872
// a given range (a tiling). This example shows how to generate a tiling
873873
// for a semi-open range of leaf cells [start, limit):
874874
//
875-
// for id := start.MaxTile(limit); id != limit; id = id.Next().MaxTile(limit)) { ... }
875+
// for id := start.MaxTile(limit); id != limit; id = id.Next().MaxTile(limit)) { ... }
876876
//
877877
// Note that in general the cells in the tiling will be of different sizes;
878878
// they gradually get larger (near the middle of the range) and then

s2/cellid_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"reflect"
2020
"testing"
2121

22-
"github.com/golang/geo/r2"
23-
"github.com/golang/geo/s1"
22+
"github.com/philiphil/geo/r2"
23+
"github.com/philiphil/geo/s1"
2424
)
2525

2626
func TestCellIDFromFace(t *testing.T) {

0 commit comments

Comments
 (0)