MCPcopy Create free account
hub / github.com/benfry/processing4 / set

Method set

core/src/processing/data/FloatList.java:166–175  ·  view source on GitHub ↗

Set the entry at a particular index. @webref floatlist:method @webBrief Set the entry at a particular index

(int index, float what)

Source from the content-addressed store, hash-verified

164 * @webBrief Set the entry at a particular index
165 */
166 public void set(int index, float what) {
167 if (index >= count) {
168 data = PApplet.expand(data, index+1);
169 for (int i = count; i < index; i++) {
170 data[i] = 0;
171 }
172 count = index+1;
173 }
174 data[index] = what;
175 }
176
177
178 /** Just an alias for append(), but matches pop() */

Callers 3

getPercentMethod · 0.95
getPercentMethod · 0.95
getPercentMethod · 0.95

Calls 1

expandMethod · 0.95

Tested by

no test coverage detected