add low_u64 to Uint256 and Uit128 types
This commit is contained in:
parent
01e164025a
commit
19f96fe62c
|
@ -38,6 +38,14 @@ macro_rules! construct_uint {
|
||||||
arr[0] as u32
|
arr[0] as u32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Conversion to u64
|
||||||
|
#[inline]
|
||||||
|
pub fn low_u64(&self) -> u64 {
|
||||||
|
let &$name(ref arr) = self;
|
||||||
|
arr[0] as u64
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Return the least number of bits needed to represent the number
|
/// Return the least number of bits needed to represent the number
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn bits(&self) -> usize {
|
pub fn bits(&self) -> usize {
|
||||||
|
|
Loading…
Reference in New Issue