MCPcopy Index your code
hub / github.com/processing/processing / set

Method set

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

Set the entry at a particular index. If the index is past the length of the list, it'll expand the list to accommodate, and fill the intermediate entries with 0s. @webref floatlist:method @brief Set the entry at a particular index

(int index, float what)

Source from the content-addressed store, hash-verified

166 * @brief Set the entry at a particular index
167 */
168 public void set(int index, float what) {
169 if (index >= count) {
170 data = PApplet.expand(data, index+1);
171 for (int i = count; i < index; i++) {
172 data[i] = 0;
173 }
174 count = index+1;
175 }
176 data[index] = what;
177 }
178
179
180 /** 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