List of utility methods to do Array Max Value
int | maxValueInRemainingListElements(String[] numberList, int initialIndex) For an array of numbers, finds the max individual value from these numbers. int maxVal = 0; int index = initialIndex; while (index < numberList.length) { if (numberList[index].length() > 0) { maxVal = Math.max(maxVal, Integer.parseInt(numberList[index])); index += 1; return maxVal; |
int | maxValuePos(final float[] in) max Value Pos float maxVal = 0.0f; int maxPos = 0; for (int i = 0; i < in.length; i++) { if (in[i] > maxVal) { maxVal = in[i]; maxPos = i; return maxPos; |
float | maxY(final float[] vertices) max Y float maxY = vertices[1]; for (int i = 0; i < vertices.length / 2; i++) { maxY = Math.max(maxY, vertices[i * 2 + 1]); return maxY; |