def test_point_track_sq_distance(): t = np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]], dtype='f4') p = np.array([-1, -1., -1], dtype='f4') assert_equal(pf.point_track_sq_distance_check(t, p, .2**2), False) pf.point_track_sq_distance_check(t, p, 2**2), True t = np.array([[0, 0, 0], [1, 0, 0], [2, 2, 0]], dtype='f4') p = np.array([.5, 0, 0], dtype='f4') assert_equal(pf.point_track_sq_distance_check(t, p, .2**2), True) p = np.array([.5, 1, 0], dtype='f4') assert_equal(pf.point_track_sq_distance_check(t, p, .2**2), False)
def test_point_track_sq_distance(): t=np.array([[0,0,0],[1,1,1],[2,2,2]],dtype='f4') p=np.array([-1,-1.,-1],dtype='f4') assert_equal( pf.point_track_sq_distance_check(t,p,.2**2), False) pf.point_track_sq_distance_check(t,p,2**2), True t=np.array([[0,0,0],[1,0,0],[2,2,0]],dtype='f4') p=np.array([.5,0,0],dtype='f4') assert_equal( pf.point_track_sq_distance_check(t,p,.2**2), True) p=np.array([.5,1,0],dtype='f4') assert_equal( pf.point_track_sq_distance_check(t,p,.2**2), False)