Java Utililty Methods Double Number Create

List of utility methods to do Double Number Create

Description

The list of methods to do Double Number Create are organized into topic(s).

Method

double[]toDouble(float[] in)
Converts a float array to a double array the "bad way".
double[] result = new double[in.length];
for (int i = 0; i < in.length; i++) {
    result[i] = (double) in[i];
return result;
double[]toDouble(float[] v)
to Double
final double[] ans = new double[v.length];
for (int k = 0; k < v.length; k++)
    ans[k] = (double) v[k];
return (ans);
double[]toDouble(float[] val, int days, int start)
net.ajaskey.market.ta.methods.toDouble
double[] da = null;
if (val != null) {
    if ((start + days) <= val.length) {
        da = new double[days];
        int knt = 0;
        for (int i = start; i < (start + days); i++) {
            da[knt++] = val[i];
return da;
double[][]toDouble(float[][] a)
to Double
double[][] b = new double[a.length][a[0].length];
for (int i = 0; i < a.length; i++)
    for (int j = 0; j < a[0].length; j++) {
        b[i][j] = a[i][j];
return b;
doubletoDouble(int x)
to Double
return (double) x / ONE_FIXED;
double[]toDouble(int[] array)
1-D Integer array to double array.
double[] n = new double[array.length];
for (int i = 0; i < array.length; i++) {
    n[i] = (double) array[i];
return n;
double[]toDouble(int[] array)
Casts to a double array.
double[] rv = new double[array.length];
for (int i = 0; i < array.length; i++) {
    rv[i] = array[i];
return rv;
double[]toDouble(int[] rgb)
Converts an integer array to a double array.
return new double[] { (double) rgb[0], (double) rgb[1], (double) rgb[2] };
double[][]toDouble(int[][] arr)
to Double
double[][] ret = new double[arr.length][arr[0].length];
for (int i = 0; i < arr.length; i++) {
    for (int j = 0; j < arr[i].length; j++)
        ret[i][j] = arr[i][j];
return ret;
DoubletoDouble(Number n)
Converts a Number to a Double.
if (n == null) {
    return null;
if (n instanceof Float) {
    return new Double(n.toString());
} else {
    return new Double(n.doubleValue());