@@ -622,7 +622,7 @@ func (c Cell) distanceInternal(targetXYZ Point, toInterior bool) s1.ChordAngle {
622
622
// arbitrary quadrilaterals after they are projected onto the sphere.
623
623
// Therefore the simplest approach is just to find the minimum distance to
624
624
// any of the four edges.
625
- return minChordAngle (edgeDistance (- dir00 , c .uv .X .Lo ),
625
+ return min (edgeDistance (- dir00 , c .uv .X .Lo ),
626
626
edgeDistance (dir01 , c .uv .X .Hi ),
627
627
edgeDistance (- dir10 , c .uv .Y .Lo ),
628
628
edgeDistance (dir11 , c .uv .Y .Hi ))
@@ -633,7 +633,7 @@ func (c Cell) distanceInternal(targetXYZ Point, toInterior bool) s1.ChordAngle {
633
633
// tests above, because (1) the edges don't meet at right angles and (2)
634
634
// there are points on the far side of the sphere that are both above *and*
635
635
// below the cell, etc.
636
- return minChordAngle (c .vertexChordDist2 (target , false , false ),
636
+ return min (c .vertexChordDist2 (target , false , false ),
637
637
c .vertexChordDist2 (target , true , false ),
638
638
c .vertexChordDist2 (target , false , true ),
639
639
c .vertexChordDist2 (target , true , true ))
@@ -651,7 +651,7 @@ func (c Cell) MaxDistance(target Point) s1.ChordAngle {
651
651
// First check the 4 cell vertices. If all are within the hemisphere
652
652
// centered around target, the max distance will be to one of these vertices.
653
653
targetUVW := faceXYZtoUVW (int (c .face ), target )
654
- maxDist := maxChordAngle (c .vertexChordDist2 (targetUVW , false , false ),
654
+ maxDist := max (c .vertexChordDist2 (targetUVW , false , false ),
655
655
c .vertexChordDist2 (targetUVW , true , false ),
656
656
c .vertexChordDist2 (targetUVW , false , true ),
657
657
c .vertexChordDist2 (targetUVW , true , true ))
@@ -685,7 +685,7 @@ func (c Cell) DistanceToEdge(a, b Point) s1.ChordAngle {
685
685
686
686
// First, check the minimum distance to the edge endpoints A and B.
687
687
// (This also detects whether either endpoint is inside the cell.)
688
- minDist := minChordAngle (c .Distance (a ), c .Distance (b ))
688
+ minDist := min (c .Distance (a ), c .Distance (b ))
689
689
if minDist == 0 {
690
690
return minDist
691
691
}
@@ -717,7 +717,7 @@ func (c Cell) MaxDistanceToEdge(a, b Point) s1.ChordAngle {
717
717
// If the maximum distance from both endpoints to the cell is less than π/2
718
718
// then the maximum distance from the edge to the cell is the maximum of the
719
719
// two endpoint distances.
720
- maxDist := maxChordAngle (c .MaxDistance (a ), c .MaxDistance (b ))
720
+ maxDist := max (c .MaxDistance (a ), c .MaxDistance (b ))
721
721
if maxDist <= s1 .RightChordAngle {
722
722
return maxDist
723
723
}
0 commit comments