public final class NFPUnsignedFloatInt extends Object
Conversion of unsigned normalized fixed-point values to and from floating point values.
The OpenGL 3.3 specification defines the conversion from floating point
values x (implied to be in the range [0, 1]) to unsigned
normalized fixed-point values f, with b bits of precision,
as:
f = x * (pow(2, b) - 1)
The specification defines the conversion from unsigned normalized
fixed-point values f with b bits of precision to floating
point values x as:
x = f / (pow(2, b) - 1)
This implementation provides general conversion functions that operate on
arbitrary values of b, and specialized functions that operate for
specific values of b using precomputed terms.
| Modifier and Type | Method and Description |
|---|---|
static float |
fromUnsignedNormalized(int f,
int b)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized10(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized11(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized12(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized13(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized14(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized15(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized16(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized17(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized18(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized19(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized2(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized20(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized21(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized22(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized23(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized24(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized25(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized26(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized27(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized28(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized29(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized3(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized30(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized31(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized32(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized4(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized5(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized6(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized7(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized8(int f)
Convert
f to floating point format. |
static float |
fromUnsignedNormalized9(int f)
Convert
f to floating point format. |
static int |
toUnsignedNormalized(float x,
int b)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized10(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized11(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized12(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized13(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized14(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized15(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized16(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized17(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized18(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized19(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized2(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized20(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized21(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized22(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized23(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized24(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized25(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized26(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized27(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized28(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized29(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized3(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized30(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized31(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized32(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized4(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized5(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized6(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized7(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized8(float x)
Convert
x to fixed-point format. |
static int |
toUnsignedNormalized9(float x)
Convert
x to fixed-point format. |
public static float fromUnsignedNormalized(int f,
int b)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ b) - 1]b - A value in the range [2, 32][0, 1]public static int toUnsignedNormalized(float x,
int b)
x to fixed-point format.x - A value in the range [0, 1]b - A value in the range [2, 32]b bits of
precisionpublic static int toUnsignedNormalized2(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized3(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized4(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized5(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized6(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized7(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized8(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized9(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized10(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized11(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized12(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized13(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized14(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized15(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized16(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized17(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized18(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized19(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized20(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized21(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized22(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized23(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized24(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized25(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized26(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized27(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized28(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized29(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized30(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized31(float x)
x to fixed-point format.x - A value in the range [0, 1]public static int toUnsignedNormalized32(float x)
x to fixed-point format.x - A value in the range [0, 1]public static float fromUnsignedNormalized2(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 2) - 1][0, 1]public static float fromUnsignedNormalized3(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 3) - 1][0, 1]public static float fromUnsignedNormalized4(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 4) - 1][0, 1]public static float fromUnsignedNormalized5(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 5) - 1][0, 1]public static float fromUnsignedNormalized6(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 6) - 1][0, 1]public static float fromUnsignedNormalized7(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 7) - 1][0, 1]public static float fromUnsignedNormalized8(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 8) - 1][0, 1]public static float fromUnsignedNormalized9(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 9) - 1][0, 1]public static float fromUnsignedNormalized10(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 10) - 1][0, 1]public static float fromUnsignedNormalized11(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 11) - 1][0, 1]public static float fromUnsignedNormalized12(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 12) - 1][0, 1]public static float fromUnsignedNormalized13(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 13) - 1][0, 1]public static float fromUnsignedNormalized14(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 14) - 1][0, 1]public static float fromUnsignedNormalized15(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 15) - 1][0, 1]public static float fromUnsignedNormalized16(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 16) - 1][0, 1]public static float fromUnsignedNormalized17(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 17) - 1][0, 1]public static float fromUnsignedNormalized18(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 18) - 1][0, 1]public static float fromUnsignedNormalized19(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 19) - 1][0, 1]public static float fromUnsignedNormalized20(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 20) - 1][0, 1]public static float fromUnsignedNormalized21(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 21) - 1][0, 1]public static float fromUnsignedNormalized22(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 22) - 1][0, 1]public static float fromUnsignedNormalized23(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 23) - 1][0, 1]public static float fromUnsignedNormalized24(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 24) - 1][0, 1]public static float fromUnsignedNormalized25(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 25) - 1][0, 1]public static float fromUnsignedNormalized26(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 26) - 1][0, 1]public static float fromUnsignedNormalized27(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 27) - 1][0, 1]public static float fromUnsignedNormalized28(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 28) - 1][0, 1]public static float fromUnsignedNormalized29(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 29) - 1][0, 1]public static float fromUnsignedNormalized30(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 30) - 1][0, 1]public static float fromUnsignedNormalized31(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 31) - 1][0, 1]public static float fromUnsignedNormalized32(int f)
f to floating point format. f is assumed to be an
unsigned fixed-point value with b bits of precision.f - A value in the range [0, (2 ^ 32) - 1][0, 1]Copyright © 2015 <code@io7m.com> http://io7m.com