Here you can find the source of minIndex(int ix1, int ix2)
Parameter | Description |
---|---|
ix1 | The first index |
ix2 | The second index to compare with ix1 |
private static int minIndex(int ix1, int ix2)
//package com.java2s; public class Main { /**// ww w.ja v a2s .co m * Internal method that returns the min between ix1 and ix2 if ix2 is not * equal to -1. * * @param ix1 The first index * @param ix2 The second index to compare with ix1 * @return ix2 if (ix2 < ix1 and ix2!=-1) else ix1 */ private static int minIndex(int ix1, int ix2) { if (ix2 == -1) { return ix1; } if (ix1 <= ix2) { return ix1; } return ix2; } }