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

Method maxIndex

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

Source from the content-addressed store, hash-verified

546 // returns the index of the maximum value.
547 // if there are ties, it returns the first one found.
548 public int maxIndex() {
549 checkMinMax("maxIndex");
550 int value = data[0];
551 int index = 0;
552 for (int i = 1; i < count; i++) {
553 if (data[i] > value) {
554 value = data[i];
555 index = i;
556 }
557 }
558 return index;
559 }
560
561
562 public int sum() {

Callers

nothing calls this directly

Calls 1

checkMinMaxMethod · 0.95

Tested by

no test coverage detected