| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 291be60 commit 2ae4c6e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2065,7 +2065,12 @@ public void setVertex(int index, PVector vec) { | |||
| 2065 | 2065 | ||
| 2066 | 2066 | vertices[index][X] = vec.x; | |
| 2067 | 2067 | vertices[index][Y] = vec.y; | |
| 2068 | - vertices[index][Z] = vec.z; | ||
| 2068 | + | ||
| 2069 | + if (vertices[index].length > 2) { | ||
| 2070 | + vertices[index][Z] = vec.z; | ||
| 2071 | + } else if (vec.z != 0 && vec.z == vec.z) { | ||
| 2072 | + throw new IllegalArgumentException("Cannot set a z-coordinate on a 2D shape"); | ||
| 2073 | + } | ||
| 2069 | 2074 | } | |
| 2070 | 2075 | ||
| 2071 | 2076 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,8 @@ X https://github.com/processing/processing/issues/2228 | |||
| 4 | 4 | X https://github.com/processing/processing/pull/2324 | |
| 5 | 5 | X move to native OS X full screen (gets rid of native code) | |
| 6 | 6 | X https://github.com/processing/processing/issues/2641 | |
| 7 | + X do bounds check on setVertex(PVector) | ||
| 8 | + X https://github.com/processing/processing/issues/2556 | ||
| 7 | 9 | ||
| 8 | 10 | data | |
| 9 | 11 | X add copy() method to Table | |
| Back | FazBrowse Home | New Git URL |
0 commit comments