mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
Merge branch 'master' of https://github.com/processing/processing
This commit is contained in:
@@ -8,6 +8,13 @@ import processing.core.PApplet;
|
||||
|
||||
|
||||
/**
|
||||
* Helper class for a list of floats. Lists are designed to have some of the
|
||||
* features of ArrayLists, but to maintain the simplicity and efficiency of
|
||||
* working with arrays.
|
||||
*
|
||||
* Functions like sort() and shuffle() always act on the list itself. To get
|
||||
* a sorted copy, use list.copy().sort().
|
||||
*
|
||||
* @webref data:composite
|
||||
*/
|
||||
public class FloatList implements Iterable<Float> {
|
||||
@@ -665,7 +672,7 @@ public class FloatList implements Iterable<Float> {
|
||||
* @webref floatlist:method
|
||||
* @brief Create a new array with a copy of all the values
|
||||
*/
|
||||
public int[] array() {
|
||||
public float[] array() {
|
||||
return array(null);
|
||||
}
|
||||
|
||||
@@ -674,9 +681,9 @@ public class FloatList implements Iterable<Float> {
|
||||
* Copy as many values as possible into the specified array.
|
||||
* @param array
|
||||
*/
|
||||
public int[] array(int[] array) {
|
||||
public float[] array(float[] array) {
|
||||
if (array == null || array.length != count) {
|
||||
array = new int[count];
|
||||
array = new float[count];
|
||||
}
|
||||
System.arraycopy(data, 0, array, 0, count);
|
||||
return array;
|
||||
|
||||
@@ -13,9 +13,12 @@ import processing.core.PApplet;
|
||||
|
||||
|
||||
/**
|
||||
* Helper class for a list of ints. By design (for efficiency), functions like
|
||||
* sort() and shuffle() always act on the list itself. To get a sorted copy,
|
||||
* use list.copy().sort().
|
||||
* Helper class for a list of ints. Lists are designed to have some of the
|
||||
* features of ArrayLists, but to maintain the simplicity and efficiency of
|
||||
* working with arrays.
|
||||
*
|
||||
* Functions like sort() and shuffle() always act on the list itself. To get
|
||||
* a sorted copy, use list.copy().sort().
|
||||
*
|
||||
* @webref data:composite
|
||||
*/
|
||||
@@ -338,7 +341,7 @@ public class IntList implements Iterable<Integer> {
|
||||
|
||||
/**
|
||||
* @webref floatlist:method
|
||||
* @brief Check if a number is a part of the data structure
|
||||
* @brief Check if a number is a part of the list
|
||||
*/
|
||||
public boolean hasValue(int value) {
|
||||
// if (indexCache == null) {
|
||||
|
||||
@@ -7,6 +7,13 @@ import java.util.Random;
|
||||
import processing.core.PApplet;
|
||||
|
||||
/**
|
||||
* Helper class for a list of Strings. Lists are designed to have some of the
|
||||
* features of ArrayLists, but to maintain the simplicity and efficiency of
|
||||
* working with arrays.
|
||||
*
|
||||
* Functions like sort() and shuffle() always act on the list itself. To get
|
||||
* a sorted copy, use list.copy().sort().
|
||||
*
|
||||
* @webref data:composite
|
||||
*/
|
||||
public class StringList implements Iterable<String> {
|
||||
|
||||
Reference in New Issue
Block a user