mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
creates top and bottom vectors if null
This commit is contained in:
@@ -405,6 +405,9 @@ public class PShape implements PConstants {
|
||||
|
||||
|
||||
public PVector getTop(PVector top) {
|
||||
if (top == null) {
|
||||
top = new PVector();
|
||||
}
|
||||
return top;
|
||||
}
|
||||
|
||||
@@ -415,6 +418,9 @@ public class PShape implements PConstants {
|
||||
|
||||
|
||||
public PVector getBottom(PVector bottom) {
|
||||
if (bottom == null) {
|
||||
bottom = new PVector();
|
||||
}
|
||||
return bottom;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user