Changeset 25455 for issm/trunk-jpl/src/m/geometry/polyarea.py
- Timestamp:
- 08/25/20 00:32:13 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/geometry/polyarea.py
r25125 r25455 5 5 6 6 def polyarea(x, y): #{{{ 7 '''7 """ 8 8 POLYAREA - returns the area of the 2-D polygon defined by the vertices in 9 9 lists x and y … … 24 24 - Test that output falls within some tolerance of MATLAB's polyarea 25 25 function. 26 ''' 26 """ 27 27 28 return 0.5 * np.abs(np.dot(x, np.roll(y, 1)) - np.dot(y, np.roll(x, 1))) 28 29 #}}}
Note:
See TracChangeset
for help on using the changeset viewer.