next_power_of_two

Function next_power_of_two 

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

Calculate the next power of two greater than or equal to n

§Arguments

  • n - The input number

§Returns

The next power of 2 that is greater than or equal to n