- Notifications
You must be signed in to change notification settings - Fork5
Commit70f5a87
committed
Small patch that adds some documentation for the area() function.
Specifically, point out that intersecting points in a path will yield(most likely), unexpected results. Visually these are identical paths,but mathematically they're not the same. Ex: area | plan------+------------------------------------------------------------------------------------------ -0 | ((0,0),(0,1),(2,1),(2,2),(1,2),(1,0),(0,0)) 2 | ((0,0),(0,1),(1,1),(1,2),(2,2),(2,1),(1,1),(1,0),(0,0))The current algorithm for area(PATH) is very quick, but only handlesnon-intersecting paths. I'm going to work on two other functions forthe PATH data type that determines if a PATH is intersecting or not,and a function that returns the area() for an intersecting PATH. Theintersecting area() function will be considerably slower (I think it'sgoing to be O(n!) or worse instead of the current O(n), but that comeswith the territory).Sean Chittenden1 parente8d9d68 commit70f5a87
1 file changed
+17
-1
lines changedLines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
5971 | 5971 |
| |
5972 | 5972 |
| |
5973 | 5973 |
| |
| 5974 | + | |
| 5975 | + | |
| 5976 | + | |
| 5977 | + | |
| 5978 | + | |
| 5979 | + | |
| 5980 | + | |
| 5981 | + | |
| 5982 | + | |
| 5983 | + | |
| 5984 | + | |
| 5985 | + | |
| 5986 | + | |
| 5987 | + | |
| 5988 | + | |
| 5989 | + | |
5974 | 5990 |
| |
5975 | 5991 |
| |
5976 | 5992 |
| |
|
0 commit comments
Comments
(0)