Function glm::builtin::findLSB
[−]
[src]
pub fn findLSB<B: BaseInt, I: GenIType, T: IntIntRel<B, I>>(value: T) -> I
Returns the bit number of the least significant bit set to 1 in the binary
representation of value
.
If value
is zero, -1
will be returned.
Example
use glm::{ findLSB, ivec2, uvec2 }; assert_eq!(findLSB(0u32), -1); let v = uvec2(0b0101000, 0x80000000); assert_eq!(findLSB(v), ivec2(3, 31));