Here you can find the source of doublesToFloat(double[] array)
static float[] doublesToFloat(double[] array)
//package com.java2s; //License from project: Open Source License public class Main { static float[] doublesToFloat(double[] array) { float[] inFloatForm = new float[array.length]; for (int i = 0; i < array.length; i++) { inFloatForm[i] = (float) array[i]; }//from ww w .jav a 2 s . c o m return inFloatForm; } }