Function bitfrob::u32_get_bit

source ·
pub const fn u32_get_bit(b: u32, u: u32) -> 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!(u32_get_bit(0, 0b0000_1110_u32), false);
assert_eq!(u32_get_bit(1, 0b0000_1110_u32), true);