is_power_of_two

Function is_power_of_two 

Source
pub fn is_power_of_two(n: usize) -> bool
Expand description

Check if a number is a power of two

§Arguments

  • n - The number to check

§Returns

true if the number is a power of 2, false otherwise