Here you can find the source of toDouble(float[] v)
public static double[] toDouble(float[] v)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] toDouble(float[] v) { final double[] ans = new double[v.length]; for (int k = 0; k < v.length; k++) ans[k] = (double) v[k]; return (ans); }//w ww .j a v a2s . c o m public static double[] toDouble(long[] v) { final double[] ans = new double[v.length]; for (int k = 0; k < v.length; k++) ans[k] = (double) v[k]; return (ans); } public static double[] toDouble(int[] v) { final double[] ans = new double[v.length]; for (int k = 0; k < v.length; k++) ans[k] = (double) v[k]; return (ans); } public static double[][] toDouble(float[][] v) { final double[][] ans = new double[v.length][]; for (int k = 0; k < v.length; k++) ans[k] = toDouble(v[k]); return (ans); } public static double[][] toDouble(long[][] v) { final double[][] ans = new double[v.length][]; for (int k = 0; k < v.length; k++) ans[k] = toDouble(v[k]); return (ans); } public static double[][] toDouble(int[][] v) { final double[][] ans = new double[v.length][]; for (int k = 0; k < v.length; k++) ans[k] = toDouble(v[k]); return (ans); } }