mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
toArray() instead of array()
This commit is contained in:
@@ -734,22 +734,34 @@ public class DoubleList implements Iterable<Double> {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public double[] array() {
|
||||
return toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a new array with a copy of all the values.
|
||||
* @return an array sized by the length of the list with each of the values.
|
||||
* @webref doublelist:method
|
||||
* @brief Create a new array with a copy of all the values
|
||||
*/
|
||||
public double[] array() {
|
||||
public double[] toArray() {
|
||||
return array(null);
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public double[] array(double[] array) {
|
||||
return toArray(array);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copy values into the specified array. If the specified array is
|
||||
* null or not the same size, a new array will be allocated.
|
||||
*/
|
||||
public double[] array(double[] array) {
|
||||
public double[] toArray(double[] array) {
|
||||
if (array == null || array.length != count) {
|
||||
array = new double[count];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user