Here you can find the source of round(double[] arr)
public static double[] round(double[] arr)
//package com.java2s; //License from project: BSD License public class Main { public static double[] round(double[] arr) { double[] result = new double[arr.length]; for (int i = 0; i < arr.length; i++) { result[i] = Math.round(arr[i]); }/* ww w . j a v a2s .c o m*/ return result; } }