Java Double Number Create toDouble(int[] array)

Here you can find the source of toDouble(int[] array)

Description

Casts to a double array.

License

Open Source License

Declaration

public static double[] toDouble(int[] array) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  w  ww.j a v  a 2 s.co m*/
     * Casts to a double array
     */
    public static double[] toDouble(float[] a) {
        double[] d = new double[a.length];
        for (int i = 0; i < a.length; i++) {
            d[i] = a[i];
        }
        return d;
    }

    /**
     * Casts to a double array.
     */
    public static double[] toDouble(int[] array) {
        double[] rv = new double[array.length];
        for (int i = 0; i < array.length; i++) {
            rv[i] = array[i];
        }
        return rv;
    }
}

Related

  1. toDouble(float[] in)
  2. toDouble(float[] v)
  3. toDouble(float[] val, int days, int start)
  4. toDouble(float[][] a)
  5. toDouble(int x)
  6. toDouble(int[] array)
  7. toDouble(int[] rgb)
  8. toDouble(int[][] arr)
  9. toDouble(Number n)