Exemplo n.º 1
0
def test_float():
    poly = ((-50, -30), (-50, 30), (50, 30), (50, -30))
    poly = np.array(poly, dtype=np.float64)

    # assert PinP.CrossingsTest( poly, (0, 0) ) is True

    assert PinP.CrossingsTest(poly, (100.0, 1.0)) is False
Exemplo n.º 2
0
def test_on_vertex():
    assert PinP.CrossingsTest(poly1, (1, 1)) is True
Exemplo n.º 3
0
def test_outside2():
    assert PinP.CrossingsTest(poly2, (2, 2)) is False
Exemplo n.º 4
0
def test_inside2():
    assert PinP.CrossingsTest(poly2, (0.5, 0.5)) is True