pub struct Div64 {
pub double_reciprocal: u256,
pub single_reciprocal: u128,
pub divisor: u64,
}
Expand description
Divisor representing a 64bit denominator.
Fields§
§double_reciprocal: u256
§single_reciprocal: u128
§divisor: u64
Implementations§
Source§impl Div64
impl Div64
Sourcepub const fn new(divisor: u64) -> Self
pub const fn new(divisor: u64) -> Self
Returns the division structure holding the given divisor.
§Panics
Panics if the divisor is zero or one.
Sourcepub const fn div_u128(n: u128, d: Self) -> u128
pub const fn div_u128(n: u128, d: Self) -> u128
Returns the quotient of the division of n
by d
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Div64
impl RefUnwindSafe for Div64
impl Send for Div64
impl Sync for Div64
impl Unpin for Div64
impl UnwindSafe for Div64
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more