Trait malachite_base::num::arithmetic::traits::IsPowerOf2
source · pub trait IsPowerOf2 {
// Required method
fn is_power_of_2(&self) -> bool;
}
Expand description
Determines whether a number is an integer power of 2.
Required Methods§
fn is_power_of_2(&self) -> bool
Implementations on Foreign Types§
source§impl IsPowerOf2 for f32
impl IsPowerOf2 for f32
source§impl IsPowerOf2 for f64
impl IsPowerOf2 for f64
source§impl IsPowerOf2 for u8
impl IsPowerOf2 for u8
source§fn is_power_of_2(&self) -> bool
fn is_power_of_2(&self) -> bool
This is a wrapper over the is_power_of_two
functions in the standard library, for
example this one.
source§impl IsPowerOf2 for u16
impl IsPowerOf2 for u16
source§fn is_power_of_2(&self) -> bool
fn is_power_of_2(&self) -> bool
This is a wrapper over the is_power_of_two
functions in the standard library, for
example this one.
source§impl IsPowerOf2 for u32
impl IsPowerOf2 for u32
source§fn is_power_of_2(&self) -> bool
fn is_power_of_2(&self) -> bool
This is a wrapper over the is_power_of_two
functions in the standard library, for
example this one.
source§impl IsPowerOf2 for u64
impl IsPowerOf2 for u64
source§fn is_power_of_2(&self) -> bool
fn is_power_of_2(&self) -> bool
This is a wrapper over the is_power_of_two
functions in the standard library, for
example this one.
source§impl IsPowerOf2 for u128
impl IsPowerOf2 for u128
source§fn is_power_of_2(&self) -> bool
fn is_power_of_2(&self) -> bool
This is a wrapper over the is_power_of_two
functions in the standard library, for
example this one.
source§impl IsPowerOf2 for usize
impl IsPowerOf2 for usize
source§fn is_power_of_2(&self) -> bool
fn is_power_of_2(&self) -> bool
This is a wrapper over the is_power_of_two
functions in the standard library, for
example this one.