Changeset 1062
- Timestamp:
- Mar 11, 2005, 12:14:59 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/util.py
r1056 r1062 20 20 theta = acos(v1) 21 21 except ValueError, e: 22 print 'Angle acos(%s) failed: %s' %(str(v1), e) 23 raise ValueError, e 24 22 print 'WARNING Angle acos(%s) failed: %s' %(str(v1), e) 23 24 #FIXME, hack to avoid acos(1.0) Value error 25 # why is it happening? 26 # is it catching something we should avoid? 27 s = 1e-6 28 if (v1+s > 1.0) and (v1-s < 1.0) : 29 theta = 0.0 30 elif (v1+s > -1.0) and (v1-s < -1.0): 31 theta = 3.1415926535897931 32 print "WARNING, setting theta to ", theta 25 33 if v2 < 0: 26 34 #Quadrant 3 or 4
Note: See TracChangeset
for help on using the changeset viewer.