We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2fc3d43 + c5e5a69 commit 6188549Copy full SHA for 6188549
s2/latlng_test.go
@@ -168,3 +168,19 @@ func TestLatLngApproxEqual(t *testing.T) {
168
}
169
170
171
+
172
+func BenchmarkPointFromLatLng(b *testing.B) {
173
+ ll := LatLng{s1.E7 * 0x150bc888, s1.E7 * 0x5099d63f}
174
+ for i := 0; i < b.N; i++ {
175
+ PointFromLatLng(ll)
176
+ }
177
+}
178
179
+func BenchmarkLatLngGetDistance(b *testing.B) {
180
+ var sum s1.Angle
181
+ x := LatLngFromDegrees(25.0, -78.0)
182
183
+ y := LatLng{s1.E7 * s1.Angle(i), 56.0 * s1.Degree}
184
+ sum += x.Distance(y)
185
186
0 commit comments