Если я поразил “Двоичный файл Отклонения” в Подключении iTunes для представления обновленного двоичного файла, я потеряю свое место в строке?

Это должно сделать это

private Double medianofFive(double[] input)
{
    Double temp;
if (input[0] > input[1])//#1 - sort First and Second
{
    temp = input[0];
    input[0] = input[1];
    input[1] = temp;
}
if (input[2] > input[3])//#2 sort Third and Fourth
{
    temp = input[2];
    input[2] = input[3];
    input[3] = temp;
}

// replace the smaller of first and third with 5th, then sort
int smallerIndex = input[0] < input[2] ? 0 : 2;//#3
input[smallerIndex] = input[4];

//sort the new pair
if(input[smallerIndex]>input[smallerIndex+1])//#4
{
    temp = input[smallerIndex];
    input[smallerIndex] = input[smallerIndex+1];
    input[smallerIndex+1] = temp;
}

//compare the two smaller numbers
// then compare the smaller of the two's partner with larger of the two
// the smaller of THOSE two is the median
if (input[2] > input[0])
//#5
{
    temp = input[2] > input[1] ? input[1] : input[2];//#6
}
else
{
    temp = input[0] > input[3] ? input[3] : input[0];//#6
}
    return temp;
}
8
задан Jim 9 October 2009 в 12:02
поделиться

2 ответа

Yup, back of the queue. See the bottom question on this Apple Developer Connection page.

15
ответ дан 5 December 2019 в 09:26
поделиться

Нам нужно было сделать это только один раз, но это было совсем не так плохо, как я предполагал, и на самом деле не потребовалось много времени, пока новый двоичный файл не прошел повторную проверку. Это намного лучше, чем выпускать приложение с ошибками ...

2
ответ дан 5 December 2019 в 09:26
поделиться
Другие вопросы по тегам:

Похожие вопросы: