Java Double Number Create toDouble(float[] a)

Here you can find the source of toDouble(float[] a)

Description

Convert the input array to a double

License

Open Source License

Parameter

Parameter Description
a a parameter

Return

The new array

Declaration

public static double[] toDouble(float[] a) 

Method Source Code

//package com.java2s;
/*----------------------------------------------------------------------------- 
 * GDSC SMLM Software/* ww w  .  ja v  a  2s .c  om*/
 * 
 * Copyright (C) 2016 Alex Herbert
 * Genome Damage and Stability Centre
 * University of Sussex, UK
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *---------------------------------------------------------------------------*/

public class Main {
    /**
     * Convert the input array to a double
     * 
     * @param a
     * @return The new array
     */
    public static double[] toDouble(float[] a) {
        if (a == null)
            return null;
        double[] b = new double[a.length];
        for (int i = 0; i < a.length; i++)
            b[i] = a[i];
        return b;
    }
}

Related

  1. toDouble(final Object valueRep)
  2. toDouble(final String argStr)
  3. toDouble(final String value)
  4. toDouble(final String value)
  5. toDouble(float in1)
  6. toDouble(float[] a)
  7. toDouble(float[] array)
  8. toDouble(float[] in)
  9. toDouble(float[] v)