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.
distance
1 parent f3dba87 commit 1d71304Copy full SHA for 1d71304
src/methods/distance.jl
@@ -192,7 +192,7 @@ end
192
193
# Returns the Euclidean distance between two points.
194
Base.@propagate_inbounds _euclid_distance(::Type{T}, p1, p2) where T =
195
- sqrt(_squared_euclid_distance(T, p1, p2))
+ hypot(T(GI.x(p2)) - T(GI.x(p1)), T(GI.y(p2)) - T(GI.y(p1)))
196
197
# Returns the square of the euclidean distance between two points
198
Base.@propagate_inbounds _squared_euclid_distance(::Type{T}, p1, p2) where T =
0 commit comments