Java Float to Double floatToDouble(float[] array)

Here you can find the source of floatToDouble(float[] array)

Description

Convert a float array to a double array.

License

Open Source License

Parameter

Parameter Description
array array of floats to convert

Return

array of doubles

Declaration

public static double[] floatToDouble(float[] array) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from   w w  w.  j a  v a 2s.  c  om
     * Convert a float array to a double array.
     * @param array array of floats to convert
     * @return array of doubles
     */
    public static double[] floatToDouble(float[] array) {
        double[] darr = new double[array.length];

        for (int i = 0; i < array.length; i++) {
            darr[i] = array[i];
        }
        return darr;
    }
}

Related

  1. floatToDouble(final float value)
  2. floatToDouble(float converThisNumberToFloat)
  3. floatToDouble(float[] values)
  4. floatToDoubleArray(float[] arr)
  5. floatToDoubleLower(float f)