Here you can find the source of toFloat(double[] in)
public static float[] toFloat(double[] in)
//package com.java2s; //License from project: Apache License public class Main { public static float[] toFloat(double[] in) { float[] out = new float[in.length]; for (int i = 0; i < in.length; i++) { out[i] = (float) in[i]; }/*from w w w .ja va 2 s.c o m*/ return out; } }