Here you can find the source of toDoubleArray(final long[] array)
Parameter | Description |
---|---|
array | input array of long values. |
public static double[] toDoubleArray(final long[] array)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w ww .j a v a 2 s .c o m*/ * Converts an array of long primitives to an array of doubles. * * @param array input array of long values. * @return Same array but with all values as double. */ public static double[] toDoubleArray(final long[] array) { double[] values = new double[array.length]; for (int i = 0; i < array.length; i++) values[i] = array[i]; return values; } }