PyDocs

Nav

Numeric and Mathematical Modules

dist

math

function · Added in 3.8
  • dist(p, q)
Return the Euclidean distance between two points p and q.

The points should be specified as sequences (or iterables) of
coordinates.  Both inputs must have the same dimension.

Roughly equivalent to:
    sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))
0 Examples
No examples for math/dist.
See Also
No see-alsos for math/dist
0 Notes
No notes for dist