List of utility methods to do Float Number Create
Float | toFloat(final String value) create Long from str. return Float.parseFloat(value);
|
float | toFloat(Float num, float defaultValue) to Float if (num == null) { return defaultValue; } else { return num.floatValue(); |
float | toFloat(int colorComponent) to Float return colorComponent / 255.0f;
|
float | toFloat(int hbits) to Float int mant = hbits & 0x03ff; int exp = hbits & 0x7c00; if (exp == 0x7c00) exp = 0x3fc00; else if (exp != 0) exp += 0x1c000; if (mant == 0 && exp > 0x1c400) ... |
float | toFloat(int majorVersion, int minorVersion) to Float return Float.parseFloat(majorVersion + "." + minorVersion); |
double | toFloat(int value) to Float return value / 100_000.0;
|
float | toFloat(int x) to Float return (float) x / ONE_FIXED; |
float[] | toFloat(int[] array) 1-D Integer array to float array. float[] n = new float[array.length]; for (int i = 0; i < array.length; i++) { n[i] = (float) array[i]; return n; |
Float | toFloat(long intPart, long decimalPart, long decimalPlaces) to Float if (intPart < 0 || decimalPart < 0 || decimalPlaces < 0) return null; if (decimalPart == 0 || decimalPlaces == 0) { return Float.valueOf(intPart); float divisor = (float) Math.pow(10, decimalPlaces); return Float.valueOf(((float) intPart) + (((float) decimalPart) / divisor)); |
Float | toFloat(Number value) to Float if (value == null) { return null; } else if (value instanceof Float) { return (Float) value; } else { return Float.valueOf(value.floatValue()); |