Java examples for XML:DOM Element
Revert order of vector elements.
//package com.java2s; public class Main { /**/*from w w w .jav a 2s .c o m*/ * Revert order of vector elements. */ public static void revert(double[] data) { double t; for (int i = 0; i < Math.floor(data.length / 2.); i++) { t = data[i]; data[i] = data[data.length - 1 - i]; data[data.length - 1 - i] = t; } } }