Java Integer Array to Double intArrayToDoubleArray(int[] ints)

Here you can find the source of intArrayToDoubleArray(int[] ints)

Description

int Array To Double Array

License

LGPL

Declaration

public static double[] intArrayToDoubleArray(int[] ints) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static double[] intArrayToDoubleArray(int[] ints) {
        double[] ret = new double[ints.length / 2];
        for (int i = 0; i < ints.length; i += 2) {
            long l = ((long) ints[i]) << 32 | ints[i + 1];
            ret[i / 2] = Double.longBitsToDouble(l);
        }/* www  .  j  a  va 2 s.  c  om*/
        return ret;
    }
}

Related

  1. arrayIntToArrayDouble(final int[] array)
  2. intArrayToDouble(int[] input)