public final class FloatUtil
extends java.lang.Object
Constructor and Description |
---|
FloatUtil() |
Modifier and Type | Method and Description |
---|---|
static long |
convertDoubleToLong(double float64)
Converts 64-bit float (double) to 64-bit float (double) stored in long value.
|
static int |
convertFloatToInt(float float32)
Converts 32-bit float to 32-bit float stored in int value.
|
static short |
convertFloatToShort(float float32)
Converts 32-bit float to 16-bit float stored in short value.
|
static float |
convertIntToFloat(int float32Value)
Converts 32-bit float stored in int value to 32-bit float.
|
static double |
convertLongToDouble(long float64Value)
Converts 64-bit float (double) stored in long value to 64-bit float (double).
|
static float |
convertShortToFloat(short float16Value)
Converts 16-bit float stored in short value to 32-bit float.
|
public static float convertShortToFloat(short float16Value)
float16Value
- Half precision float value stored in short to convert.public static short convertFloatToShort(float float32)
float32
- Single precision float to convert.public static float convertIntToFloat(int float32Value)
float32Value
- Single precision float value stored in int to convert.public static int convertFloatToInt(float float32)
float32
- Single precision float to convert.public static double convertLongToDouble(long float64Value)
float64Value
- Double precision float value stored in long to convert.public static long convertDoubleToLong(double float64)
float64
- Double precision float to convert.Last updated 2024-12-05 10:34:50