@@ -38,16 +38,16 @@ import (
3838//
3939// Polygons have the following restrictions:
4040//
41- // - Loops may not cross, i.e. the boundary of a loop may not intersect
42- // both the interior and exterior of any other loop.
41+ // - Loops may not cross, i.e. the boundary of a loop may not intersect
42+ // both the interior and exterior of any other loop.
4343//
44- // - Loops may not share edges, i.e. if a loop contains an edge AB, then
45- // no other loop may contain AB or BA.
44+ // - Loops may not share edges, i.e. if a loop contains an edge AB, then
45+ // no other loop may contain AB or BA.
4646//
47- // - Loops may share vertices, however no vertex may appear twice in a
48- // single loop (see Loop).
47+ // - Loops may share vertices, however no vertex may appear twice in a
48+ // single loop (see Loop).
4949//
50- // - No loop may be empty. The full loop may appear only in the full polygon.
50+ // - No loop may be empty. The full loop may appear only in the full polygon.
5151type Polygon struct {
5252 loops []* Loop
5353
@@ -581,13 +581,13 @@ func (p *Polygon) LastDescendant(k int) int {
581581}
582582
583583// CapBound returns a bounding spherical cap.
584- func (p * Polygon ) CapBound () Cap { return p .bound .CapBound () }
584+ func (p Polygon ) CapBound () Cap { return p .bound .CapBound () }
585585
586586// RectBound returns a bounding latitude-longitude rectangle.
587- func (p * Polygon ) RectBound () Rect { return p .bound }
587+ func (p Polygon ) RectBound () Rect { return p .bound }
588588
589589// ContainsPoint reports whether the polygon contains the point.
590- func (p * Polygon ) ContainsPoint (point Point ) bool {
590+ func (p Polygon ) ContainsPoint (point Point ) bool {
591591 // NOTE: A bounds check slows down this function by about 50%. It is
592592 // worthwhile only when it might allow us to delay building the index.
593593 if ! p .index .IsFresh () && ! p .bound .ContainsPoint (point ) {
@@ -611,7 +611,7 @@ func (p *Polygon) ContainsPoint(point Point) bool {
611611}
612612
613613// ContainsCell reports whether the polygon contains the given cell.
614- func (p * Polygon ) ContainsCell (cell Cell ) bool {
614+ func (p Polygon ) ContainsCell (cell Cell ) bool {
615615 it := p .index .Iterator ()
616616 relation := it .LocateCellID (cell .ID ())
617617
@@ -635,7 +635,7 @@ func (p *Polygon) ContainsCell(cell Cell) bool {
635635}
636636
637637// IntersectsCell reports whether the polygon intersects the given cell.
638- func (p * Polygon ) IntersectsCell (cell Cell ) bool {
638+ func (p Polygon ) IntersectsCell (cell Cell ) bool {
639639 it := p .index .Iterator ()
640640 relation := it .LocateCellID (cell .ID ())
641641
@@ -663,7 +663,7 @@ func (p *Polygon) IntersectsCell(cell Cell) bool {
663663}
664664
665665// CellUnionBound computes a covering of the Polygon.
666- func (p * Polygon ) CellUnionBound () []CellID {
666+ func (p Polygon ) CellUnionBound () []CellID {
667667 // TODO(roberts): Use ShapeIndexRegion when it's available.
668668 return p .CapBound ().CellUnionBound ()
669669}
0 commit comments