/** * Returns the actual array being used to store the data. For advanced users, * this is the fastest way to access a large list. Suitable for iterating * with a for() loop, but modifying the list will have terrible consequences. */ public float[] values() { crop(); return data; }
/** * Returns the actual array being used to store the data. For advanced users, * this is the fastest way to access a large list. Suitable for iterating * with a for() loop, but modifying the list will have terrible consequences. */ public float[] values() { crop(); return data; }
/** * Construct an FloatList from an iterable pile of objects. * For instance, a float array, an array of strings, who knows). * Un-parseable or null values will be set to NaN. * @nowebref */ public FloatList(Iterable<Object> iter) { this(10); for (Object o : iter) { if (o == null) { append(Float.NaN); } else if (o instanceof Number) { append(((Number) o).floatValue()); } else { append(PApplet.parseFloat(o.toString().trim())); } } crop(); }