MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkFindDistanceBetweenTwoPoints

Function BenchmarkFindDistanceBetweenTwoPoints

math/geometry/distance_test.go:73–80  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

71}
72
73func BenchmarkFindDistanceBetweenTwoPoints(b *testing.B) {
74 p1 := geometry.EuclideanPoint{0, 0}
75 p2 := geometry.EuclideanPoint{2, -2}
76
77 for i := 0; i < b.N; i++ {
78 _, _ = geometry.EuclideanDistance(p1, p2)
79 }
80}

Callers

nothing calls this directly

Calls 1

EuclideanDistanceFunction · 0.92

Tested by

no test coverage detected