Here you can find the source of truncate(double[] arr, int m)
public static double[] truncate(double[] arr, int m)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] truncate(double[] arr, int m) { double[] tArr = new double[m]; System.arraycopy(arr, 0, tArr, 0, m); return tArr; }/* w ww. j av a2 s . com*/ }