Here you can find the source of minIndex(float[] vals)
public static int minIndex(float[] vals)
//package com.java2s; public class Main { public static int minIndex(float[] vals) { float min = Float.MAX_VALUE; int minI = -1; for (int i = 0; i < vals.length; i++) if (vals[i] < min) { minI = i;/*from w ww . j a va 2 s . co m*/ min = vals[i]; } return minI; } }