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

Method set

core/src/processing/data/DoubleList.java:172–181  ·  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 doublelist:method @brief Set the entry at a particular index

(int index, double what)

Source from the content-addressed store, hash-verified

170 * @brief Set the entry at a particular index
171 */
172 public void set(int index, double what) {
173 if (index >= count) {
174 data = PApplet.expand(data, index+1);
175 for (int i = count; i < index; i++) {
176 data[i] = 0;
177 }
178 count = index+1;
179 }
180 data[index] = what;
181 }
182
183
184 /** Just an alias for append(), but matches pop() */

Callers 1

getPercentMethod · 0.95

Calls 1

expandMethod · 0.95

Tested by

no test coverage detected