static float Min(float[] a){ int minIndex = 0; float min = a[minIndex]; for (int i = 1; i < a.Length; i++) { if (a[i] < min) { minIndex = i; min = a[minIndex]; } } return min;}