Function bitfrob::u64_get_bit

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