Skip to content

Commit bf6c762

Browse files
committed
data updates from java mode
1 parent 494ac5d commit bf6c762

17 files changed

+4206
-605
lines changed

core/src/processing/core/PApplet.java

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5862,18 +5862,16 @@ static public int[] expand(int list[], int newSize) {
58625862
return temp;
58635863
}
58645864

5865-
5866-
static public PImage[] expand(PImage list[]) {
5867-
return expand(list, list.length << 1);
5865+
static public long[] expand(long list[]) {
5866+
return expand(list, list.length > 0 ? list.length << 1 : 1);
58685867
}
58695868

5870-
static public PImage[] expand(PImage list[], int newSize) {
5871-
PImage temp[] = new PImage[newSize];
5869+
static public long[] expand(long list[], int newSize) {
5870+
long temp[] = new long[newSize];
58725871
System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length));
58735872
return temp;
58745873
}
58755874

5876-
58775875
static public float[] expand(float list[]) {
58785876
return expand(list, list.length << 1);
58795877
}
@@ -5884,6 +5882,15 @@ static public float[] expand(float list[], int newSize) {
58845882
return temp;
58855883
}
58865884

5885+
static public double[] expand(double list[]) {
5886+
return expand(list, list.length > 0 ? list.length << 1 : 1);
5887+
}
5888+
5889+
static public double[] expand(double list[], int newSize) {
5890+
double temp[] = new double[newSize];
5891+
System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length));
5892+
return temp;
5893+
}
58875894

58885895
static public String[] expand(String list[]) {
58895896
return expand(list, list.length << 1);
@@ -6178,6 +6185,15 @@ static public int[] subset(int list[], int start, int count) {
61786185
return output;
61796186
}
61806187

6188+
static public long[] subset(long[] list, int start) {
6189+
return subset(list, start, list.length - start);
6190+
}
6191+
6192+
static public long[] subset(long[] list, int start, int count) {
6193+
long[] output = new long[count];
6194+
System.arraycopy(list, start, output, 0, count);
6195+
return output;
6196+
}
61816197

61826198
static public float[] subset(float list[], int start) {
61836199
return subset(list, start, list.length - start);
@@ -6189,6 +6205,15 @@ static public float[] subset(float list[], int start, int count) {
61896205
return output;
61906206
}
61916207

6208+
static public double[] subset(double[] list, int start) {
6209+
return subset(list, start, list.length - start);
6210+
}
6211+
6212+
static public double[] subset(double[] list, int start, int count) {
6213+
double[] output = new double[count];
6214+
System.arraycopy(list, start, output, 0, count);
6215+
return output;
6216+
}
61926217

61936218
static public String[] subset(String list[], int start) {
61946219
return subset(list, start, list.length - start);

0 commit comments

Comments
 (0)