Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

is_power_of_two

Check if the given number is power of 2

Arguments

  • n - The given number

Returns

  • bool - if the given number is power of 2

Fully qualified path: alexandria_math::is_power_of_two::is_power_of_two

pub fn is_power_of_two(n: u128) -> bool