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

Method maxIndex

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

Source from the content-addressed store, hash-verified

584 // returns the index of the maximum value.
585 // if there are ties, it returns the first one found.
586 public int maxIndex() {
587 checkMinMax("maxIndex");
588 int value = data[0];
589 int index = 0;
590 for (int i = 1; i < count; i++) {
591 if (data[i] > value) {
592 value = data[i];
593 index = i;
594 }
595 }
596 return index;
597 }
598
599
600 public int sum() {

Callers

nothing calls this directly

Calls 1

checkMinMaxMethod · 0.95

Tested by

no test coverage detected