MCPcopy Index your code
hub / github.com/benfry/processing4 / minIndex

Method minIndex

core/src/processing/data/IntList.java:515–527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

513 // returns the index of the minimum value.
514 // if there are ties, it returns the first one found.
515 @SuppressWarnings("unused")
516 public int minIndex() {
517 checkMinMax("minIndex");
518 int value = data[0];
519 int index = 0;
520 for (int i = 1; i < count; i++) {
521 if (data[i] < value) {
522 value = data[i];
523 index = i;
524 }
525 }
526 return index;
527 }
528
529
530 /**

Callers

nothing calls this directly

Calls 1

checkMinMaxMethod · 0.95

Tested by

no test coverage detected