Can you explain how you came up with this logic in isClose function: def isClose(self, p1, p2): dist = self.findDistance(p1, p2) calibration = (p1[1] + p2[1]) / 2 if 0 < dist < 0.25 * calibration: return True else: return False
Can you explain how you came up with this logic in isClose function:
def isClose(self, p1, p2):
dist = self.findDistance(p1, p2)
calibration = (p1[1] + p2[1]) / 2
if 0 < dist < 0.25 * calibration:
return True
else:
return False