Skip to content

Commit 9c70ae5

Browse files
committed
Add and reformat comments
Add some comments that were being stripped.
1 parent 29de3e1 commit 9c70ae5

7 files changed

+17
-2
lines changed

s2/edge_query_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var (
3535
// this flag allows that to happen.
3636
//
3737
// To set in testing add "--benchmark_edge_query_range=5" to your test command.
38+
// When using blaze/bazel add "--test_arg=--benchmark_edge_query_range=5"
3839
benchmarkEdgeQueryRange = flag.Int("benchmark_edge_query_range", 7,
3940
"Set the upper limit on times to scale up the edge query "+
4041
"edge counts in benchmark runs.")

s2/example_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ func ExampleEdgeQuery_FindEdges_findClosestEdges() {
122122
polylines := []s2.Polyline{
123123
// This is an iteration = 3 Koch snowflake centered at the
124124
// center of the continental US.
125+
//
126+
// This was generated as:
127+
//
128+
// fractal := newFractal()
129+
// fractal.setLevelForApproxMaxEdges(48)
130+
// fractal.makeLoop(randomFrameAtPoint(
131+
// PointFromLatLng(LatLngFromDegrees(39.833, -98.55))), s1.Angle(0.15))
125132
s2.Polyline{
126133
s2.PointFromLatLng(s2.LatLngFromDegrees(47.5467, -103.6035)),
127134
s2.PointFromLatLng(s2.LatLngFromDegrees(45.9214, -103.7320)),

s2/loop_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ var (
148148
lineTriangle,
149149
skinnyChevron,
150150
loopA,
151-
//snappedLoopA, // Fails TestAreaConsistentWithTurningAngle
151+
// snappedLoopA, // Fails TestAreaConsistentWithTurningAngle
152152
loopB,
153153
aIntersectB,
154154
aUnionB,

s2/metric.go

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ type Metric struct {
3434

3535
// Defined metrics.
3636
// Of the projection methods defined in C++, Go only supports the quadratic projection.
37+
// See
38+
// https://github.com/google/s2geometry/blob/58de4ea1e2f8a294e0c072c602c22232fd1433ad/src/s2/s2coords.h#L238
39+
// for more details.
3740

3841
// Each cell is bounded by four planes passing through its four edges and
3942
// the center of the sphere. These metrics relate to the angle between each

s2/regioncoverer_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ func TestRegionCovererIsCanonical(t *testing.T) {
298298
}
299299
}
300300

301+
// To run these benchmarks with blaze/bazel use:
302+
// blaze test -c opt --test_output=all --test_arg=--test.bench=BenchmarkRegion --test_arg=--test.benchmem util/geometry/go:s2_test
303+
301304
const numCoveringBMRegions = 1000
302305

303306
func BenchmarkRegionCovererCoveringCap(b *testing.B) {

s2/s2_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828

2929
var (
3030
// To set in testing add "--benchmark_brute_force=true" to your test command.
31+
// When using blaze/bazel add "--test_arg=--benchmark_brute_force=true"
3132
benchmarkBruteForce = flag.Bool("benchmark_brute_force", false,
3233
"When set, use brute force algorithms in benchmarking.")
3334
)

s2/stuv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
// transformation is designed to make the cells at each level fairly uniform
3333
// in size.
3434
//
35-
////////////////////////// S2 Cell Decomposition /////////////////////////
35+
// /////////////////////// S2 Cell Decomposition /////////////////////////
3636
//
3737
// The following methods define the cube-to-sphere projection used by
3838
// the Cell decomposition.

0 commit comments

Comments
 (0)