Package com.jogamp.opengl.math
Class Binary32
java.lang.Object
com.jogamp.opengl.math.Binary32
Functions for interrogating
binary32 (float) values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intunpackGetExponentUnbiased(float d) Extract and unbias the exponent of the given packedfloatvalue.static intunpackGetSign(float d) Return the sign of the given float value.static intunpackGetSignificand(float d) Return the significand of the given float value.
-
Constructor Details
-
Binary32
public Binary32()
-
-
Method Details
-
unpackGetExponentUnbiased
public static int unpackGetExponentUnbiased(float d) Extract and unbias the exponent of the given packed
floatvalue.The exponent is encoded biased as a number in the range
[0, 255], with0indicating that the number is subnormal and[1, 254]denoting the actual exponent plusBIAS. Infinite andNaNvalues always have a biased exponent of255.This function will therefore return:
-
0 -iff the input is a subnormal number.BIAS= -127 - An integer in the range
[1 -iff the input is a normal number.BIAS, 254 -BIAS] = [-126, 127] -
255 -iff the input isBIAS= 128#POSITIVE_INFINITY,#NEGATIVE_INFINITY, orNaN.
- See Also:
-
#packSetExponentUnbiasedUnchecked(int)
-
-
unpackGetSign
public static int unpackGetSign(float d) Return the sign of the given float value.
-
unpackGetSignificand
public static int unpackGetSignificand(float d) Return the significand of the given float value.
-