Function bitfrob::u16_get_bit
source · pub const fn u16_get_bit(b: u32, u: u16) -> bool
Expand description
Determines if the b
bit is set in u
.
Panics
b
can’t exceed the number of bits in the type.
assert_eq!(u16_get_bit(0, 0b0000_1110_u16), false);
assert_eq!(u16_get_bit(1, 0b0000_1110_u16), true);