Function glm::builtin::floatBitsToInt
[−]
[src]
pub fn floatBitsToInt<G: GenIType, T: FloatIntRel<f32, i32, G>>(value: T) -> G
Returns a signed integer value representing the encoding of a floating-point value.
The floating-point value's bit-level representation is preserved.
Example
use glm::*; use num::Float; let f = 1_f32; let i = floatBitsToInt(f); assert_eq!(i, 0x3F800000); let inf: f32 = Float::infinity(); let v = vec3(0.2, 0., inf); assert_eq!(floatBitsToInt(v), ivec3(0x3E4CCCCD, 0, 0x7f800000));