Oct 25, 2020

distance_between() returns the scalar distance between two points.

def distance_between(p1, p2):

a = p2[0] - p1[0]

b = p2[1] - p1[1]

return np.sqrt((a ** 2) + (b ** 2))

Oct 25, 2020

distance_between() returns the scalar distance between two points.

def distance_between(p1, p2):

a = p2[0] - p1[0]

b = p2[1] - p1[1]

return np.sqrt((a ** 2) + (b ** 2))