Java Float Array Create toFloatArray(final double[] doubleArray)

Here you can find the source of toFloatArray(final double[] doubleArray)

Description

to Float Array

License

Apache License

Declaration

static float[] toFloatArray(final double[] doubleArray) 

Method Source Code

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

public class Main {
    static float[] toFloatArray(final double[] doubleArray) {
        if (doubleArray == null) {
            return null;
        } else {//w  ww . j av  a 2 s .co m
            final int size = doubleArray.length;
            final float[] floatArray = new float[size];
            for (int i = 0; i < size; i++) {
                floatArray[i] = (float) doubleArray[i];
            }
            return floatArray;
        }
    }
}

Related

  1. toFloatArray(byte[] data)
  2. toFloatArray(byte[] data)
  3. toFloatArray(double[] doubleArray)
  4. toFloatArray(double[][] array)
  5. toFloatArray(final byte[] array)
  6. toFloatArray(final Object[] array)
  7. toFloatArray(Float[] data)
  8. toFloatArray(Number[] array)
  9. toFloatArray(Object[] arr)