Function glm::builtin::uintBitsToFloat
[−]
[src]
pub fn uintBitsToFloat<G: GenType, T: IntFloatRel<u32, f32, G>>(value: T) -> G
Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value.
Example
use glm::{ uintBitsToFloat, vec3, uvec3 }; use num::Float; let i: u32 = 0x3F800000; let f = uintBitsToFloat(i); assert_eq!(f, 1.); let inf: f32 = Float::infinity(); let vu = uvec3(0x3E4CCCCD, 0, 0x7f800000); let vf = vec3(0.2, 0., inf); assert_eq!(uintBitsToFloat(vu), vf);