def test_anticlockwise_polygon_winding(self): """Tests the algorithm returns False (anti-clockwise) for an anti-clockwise polygon.""" poly = np.array([[1, 1], [1, 2], [2, 2], [2, 1]], dtype=np.double) poly = np.array(poly[::-1]) self.assertFalse(winding2d(poly))
def test_anticlockwise_polygon_winding(self): """Tests the algorithm returns False (anti-clockwise) for an anti-clockwise polygon.""" poly = np.array([[1, 1], [1, 2], [2, 2], [2, 1]], dtype=np.double) poly = np.array(poly[::-1]) self.assertFalse(winding2d(poly))
def test_clockwise_polygon_winding(self): """Tests the algorithm returns True (clockwise) for a clockwise polygon.""" poly = np.array([[1, 1], [1, 2], [2, 2], [2, 1]], dtype=np.double) self.assertTrue(winding2d(poly))
def test_clockwise_polygon_winding(self): """Tests the algorithm returns True (clockwise) for a clockwise polygon.""" poly = np.array([[1, 1], [1, 2], [2, 2], [2, 1]], dtype=np.double) self.assertTrue(winding2d(poly))