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