The math.dist()
function calculates the Euclidean distance between two points in a given space.
math.dist(p,q)
copy
Where, parameters p
and q
are iterables representing the first point and the second point in two-dimensional space, respectively.
This function returns the Euclidean distance between two points. The value returned is roughly equivalent to: sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))