Changeset 2704 for inundation/utilities/test_numerical_tools.py
 Timestamp:
 Apr 12, 2006, 5:52:34 AM (17 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

inundation/utilities/test_numerical_tools.py
r2534 r2704 20 20 21 21 22 def test_angle(self): 22 def test_angle1(self): 23 """Test angles between one vector and the xaxis 24 """ 25 assert allclose(angle([1.0, 0.0])/pi*180, 0.0) 23 26 assert allclose(angle([1.0, 1.0])/pi*180, 45.0) 27 assert allclose(angle([0.0, 1.0])/pi*180, 90.0) 28 assert allclose(angle([1.0, 1.0])/pi*180, 135.0) 29 assert allclose(angle([1.0, 0.0])/pi*180, 180.0) 30 assert allclose(angle([1.0, 1.0])/pi*180, 225.0) 31 assert allclose(angle([0.0, 1.0])/pi*180, 270.0) 32 assert allclose(angle([1.0, 1.0])/pi*180, 315.0) 33 34 35 def test_angle2(self): 36 """Test angles between two arbitrary vectors 37 """ 38 39 assert allclose(angle([1.0, 0.0], [1.0, 1.0])/pi*180, 315.0) 40 assert allclose(angle([1.0, 1.0], [1.0, 0.0])/pi*180, 45.0) 41 42 assert allclose(angle([1.0, 1.0], [1.0, 1.0])/pi*180, 180) 43 assert allclose(angle([1.0, 1.0], [1.0, 1.0])/pi*180, 90.0) 44 45 assert allclose(angle([1.0, 0.0], [1.0, 1.0])/pi*180, 135.0) 46 assert allclose(angle([0.0, 1.0], [1.0, 1.0])/pi*180, 225.0) 47 48 assert allclose(angle([1.0, 1.0], [1.0, 1.0])/pi*180, 270.0) 49 assert allclose(angle([1.0, 0.0], [0.0, 1.0])/pi*180, 270.0) 50 51 52 53 54 55 24 56 25 57
Note: See TracChangeset
for help on using the changeset viewer.