def equal(p0,p1,p2,tolerance):
    d1, d2 = (p0-p1).astype('float'), (p2-p1).astype('float')
    l1 = np.sqrt(d1[0]**2+d1[1]**2)
    l2 = np.sqrt(d2[0]**2+d2[1]**2)
    if l1<=l2*(1+tolerance) and l1>=l2*(1-tolerance):
        return True
    else :
        return False
dataset/ETHPy150Open fatcloud/PyCV-time/challanges/shape-challenge/Square/Video_find_square_0702.py/equal/original