Dec-15-2018, 08:28 AM
(This post was last modified: Dec-15-2018, 08:29 AM by Gribouillis.)
There are several ways to measure the distance between two points in the plane
def distA(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2) def distB(x1, y1, x2, y2): return ((x1 - x2)**2 + abs(y1 - y2)**2)**0.5 def distC(x1, y1, x2, y2): return max(abs(x1 - x2), abs(y1 - y2))