Here you can find the source of copySignedIntToDoubleArray(int[] src)
Copy an array of signed values in int, into an array of double.
Sign extension is performed.
Parameter | Description |
---|---|
src | an array of int, whose values are interpreted as signed |
static public double[] copySignedIntToDoubleArray(int[] src)
//package com.java2s; public class Main { /**/* w w w . j a va2 s .co m*/ * <p>Copy an array of signed values in int, into an array of double.</p> * * <p>Sign extension is performed.</p> * * @param src an array of int, whose values are interpreted as signed * @return an array of double */ static public double[] copySignedIntToDoubleArray(int[] src) { if (src == null) return null; int n = src.length; double[] dst = new double[n]; for (int j = 0; j < n; ++j) { dst[j] = src[j]; // allow sign extension } return dst; } }