public final class Half extends Number implements Comparable<Half>
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE |
| Constructor and Description |
|---|
Half(short shortBits) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Half other) |
double |
doubleValue() |
boolean |
equals(Object other) |
static short |
floatToShortBits(float floatValue)
Converts a float value to IEEE 754 half-precision bits.
|
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
static short |
parseHalf(String value) |
static float |
shortBitsToFloat(short shortBits)
Converts an IEEE 754 half-precision data type to single-precision.
|
String |
toString() |
static Half |
valueOf(String value) |
byteValue, shortValuepublic static final int SIZE
public float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic int compareTo(Half other)
compareTo in interface Comparable<Half>public static Half valueOf(String value) throws NumberFormatException
NumberFormatExceptionpublic static short parseHalf(String value) throws NumberFormatException
NumberFormatExceptionpublic static float shortBitsToFloat(short shortBits)
shortBits - a 16 bit half precision valuepublic static short floatToShortBits(float floatValue)
floatValue - a float valueCopyright © 2023. All rights reserved.