intBitsToFloat() 函数可以将 32 位整数解释为单精度浮点数值。
float intBitsToFloat(int value)
value:32 位整数值。value 解释为单精度浮点数值。
int intValue = 1065353216; // 表示 1.0 的 IEEE 754 二进制形式
float floatValue = intBitsToFloat(intValue); // 将 intValue 解释为单精度浮点数值
// floatValue 等于 1.0
value 参数必须是 32 位整数。floatBitsToInt() 函数将浮点数解释为整数。关于函数的详细解释可以参考『OpenGL 4.6Core Profile规范』的第 86 页。
floatBitsToInt(): 将单精度浮点数解释为 32 位整数。uintBitsToFloat(): 将无符号整数解释为单精度浮点数。floatBitsToUint(): 将单精度浮点数解释为无符号整数。