Here you can find the source of doubleArrayToFloatArray(double[] doubleArray)
public static float[] doubleArrayToFloatArray(double[] doubleArray)
//package com.java2s; //License from project: Open Source License public class Main { public static float[] doubleArrayToFloatArray(double[] doubleArray) { if (doubleArray == null) return null; float[] floatArray; floatArray = new float[doubleArray.length]; for (int i = 0; i < doubleArray.length; i++) { floatArray[i] = (float) doubleArray[i]; }//from w w w . j a va 2s .com return floatArray; } }