Changeset 1063
- Timestamp:
- Mar 11, 2005, 3:32:51 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/test_util.py
r1032 r1063 927 927 assert outside_polygon( [1.5, 0.5], U ) 928 928 #evaluate to True as the point 1.5, 0.5 is outside the unit square 929 929 930 930 indices = outside_polygon( [[0.5, 0.5], [1, -0.5], [0.3, 0.2]], U ) 931 931 assert allclose( indices, [1] ) … … 945 945 946 946 assert allclose( res, [0, 4, 5] ) 947 948 def test_outside_polygon2(self): 949 U = [[0,0], [1,0], [1,1], [0,1]] #Unit square 950 951 assert not outside_polygon( [0.5, 1.0], U, closed = True ) 952 #evaluate to False as the point 0.5, 1.0 is inside the unit square 947 953 954 assert outside_polygon( [0.5, 1.0], U, closed = False ) 955 #evaluate to True as the point 0.5, 1.0 is outside the unit square 948 956 949 957 def test_populate_polygon(self):
Note: See TracChangeset
for help on using the changeset viewer.