List of utility methods to do Double to Float
Float | doubleToFloat(double d) double To Float if (d >= Float.MIN_VALUE && d <= Float.MAX_VALUE) { return (float) d; return null; |
float[] | doubleToFloat(double[] array) Convert a double array to a float array. float[] farr = new float[array.length]; for (int i = 0; i < array.length; i++) { farr[i] = (float) array[i]; return farr; |
float[] | doubleToFloat(double[] array) double To Float float[] toReturn = new float[array.length]; for (int i = 0; i < array.length; ++i) toReturn[i] = (float) array[i]; return toReturn; |
Float | doubleToFloat(final double value) double To Float return (float) value; |