Here you can find the source of invertOrder(double[] values)
public static void invertOrder(double[] values)
//package com.java2s; //License from project: Open Source License public class Main { /**//ww w . j a v a 2s . co m * Inverts the order of the values in an array of doubles. * The passed array is altered. */ public static void invertOrder(double[] values) { // invert order of values final int length = values.length; final int halfLength = length / 2; for (int i = 0; i < halfLength; i++) { final double temp = values[i]; values[i] = values[length - i - 1]; values[length - i - 1] = temp; } } }