Here you can find the source of double2Float(double[] v)
public static float[] double2Float(double[] v)
//package com.java2s; //License from project: Apache License public class Main { public static float[] double2Float(double[] v) { float f[] = new float[v.length]; for (int i = 0; i < v.length; i++) { f[i] = (float) v[i]; }/* ww w . j a va2 s. c om*/ return f; } }