Java Double Array Convert doubleArrayToFloatArray(double[] doubleArray)

Here you can find the source of doubleArrayToFloatArray(double[] doubleArray)

Description

double Array To Float Array

License

Open Source License

Declaration

public static float[] doubleArrayToFloatArray(double[] doubleArray) 

Method Source Code

//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;
    }
}

Related

  1. doubleArrayToBytes(double[] d)
  2. doubleArrayToClassNames(int[] labels, String[] classNames, Character separatorChar)
  3. doubleArrayToIntArray(double[] doubles)