Class of android.util · Half.java · Android's reference
public final class Half extends Number implements Comparable<Half>
An IEEE 754 binary16 value: 1 sign bit, 5 exponent bits, 10 mantissa bits.
public static final int SIZE = 16 sourcepublic static final short EPSILON = 0x1400 sourcepublic static final short LOWEST_VALUE sourcepublic static final short MAX_VALUE = 0x7bff sourcepublic static final short MIN_NORMAL = 0x0400 sourcepublic static final short MIN_VALUE = 0x0001 sourcepublic static final short NaN = 0x7e00 sourcepublic static final short NEGATIVE_INFINITY sourcepublic static final short NEGATIVE_ZERO sourcepublic static final short POSITIVE_INFINITY = 0x7c00 sourcepublic static final short POSITIVE_ZERO = 0x0000 sourcepublic static final int MAX_EXPONENT = 15 sourcepublic static final int MIN_EXPONENT = -14 sourcepublic Half(short value) sourcepublic Half(float value) sourcepublic Half(double value) sourcepublic Half(String s) throws NumberFormatException sourcepublic static Half valueOf(short h) sourcepublic static Half valueOf(float f) sourcepublic static Half valueOf(String s) sourcepublic short halfValue() sourcepublic byte byteValue() sourcepublic short shortValue() sourcepublic int intValue() sourcepublic long longValue() sourcepublic float floatValue() sourcepublic double doubleValue() sourcepublic boolean isNaN() sourcepublic static boolean isNaN(short h) sourcepublic static boolean isInfinite(short h) sourcepublic static int halfToIntBits(short h) sourcepublic static int halfToRawIntBits(short h) sourcepublic static short intBitsToHalf(int bits) sourcepublic static float toFloat(short h) sourceThe float of a half, exactly: each half value is a float value.
public static short toHalf(float f) sourceThe nearest half of a float, ties to even. A NaN stays a NaN, and a value too large becomes infinity.
public static String toString(short h) sourcepublic static int compare(short x, short y) sourceAs Float.compare: -0 is less than +0, and NaN is greater than each other value.
public int compareTo(Half h) sourcepublic boolean equals(Object o) sourcepublic int hashCode() sourcepublic String toString() sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.