@@ -5862,18 +5862,16 @@ static public int[] expand(int list[], int newSize) {
5862
5862
return temp ;
5863
5863
}
5864
5864
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 );
5868
5867
}
5869
5868
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 ];
5872
5871
System .arraycopy (list , 0 , temp , 0 , Math .min (newSize , list .length ));
5873
5872
return temp ;
5874
5873
}
5875
5874
5876
-
5877
5875
static public float [] expand (float list []) {
5878
5876
return expand (list , list .length << 1 );
5879
5877
}
@@ -5884,6 +5882,15 @@ static public float[] expand(float list[], int newSize) {
5884
5882
return temp ;
5885
5883
}
5886
5884
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
+ }
5887
5894
5888
5895
static public String [] expand (String list []) {
5889
5896
return expand (list , list .length << 1 );
@@ -6178,6 +6185,15 @@ static public int[] subset(int list[], int start, int count) {
6178
6185
return output ;
6179
6186
}
6180
6187
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
+ }
6181
6197
6182
6198
static public float [] subset (float list [], int start ) {
6183
6199
return subset (list , start , list .length - start );
@@ -6189,6 +6205,15 @@ static public float[] subset(float list[], int start, int count) {
6189
6205
return output ;
6190
6206
}
6191
6207
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
+ }
6192
6217
6193
6218
static public String [] subset (String list [], int start ) {
6194
6219
return subset (list , start , list .length - start );
0 commit comments