pub struct NativeFixedU128<const F: u32> { /* private fields */ }Expand description
Native Fixed point numbers with F bits of precision
Implementations§
Source§impl<const F: u32> NativeFixedU128<F>
impl<const F: u32> NativeFixedU128<F>
pub fn new(v: NativeInt) -> Self
pub fn one() -> Self
pub fn to_bits(&self) -> u128
pub fn from_bits(bits: u128) -> Self
pub fn mul_by_int(&self, v: NativeInt) -> Self
pub fn div_by_int(&self, v: NativeInt) -> Self
pub fn checked_mul(&self, v: Self) -> Self
pub fn checked_add(&self, v: Self) -> Self
pub fn checked_div(&self, v: Self) -> Self
pub fn saturating_sub(&self, v: Self) -> Self
pub fn checked_sub(&self, v: Self) -> Self
pub fn ge(&self, v: NativeInt) -> bool
pub fn gt(&self, v: NativeInt) -> bool
pub fn le(&self, v: NativeInt) -> bool
pub fn lt(&self, v: NativeInt) -> bool
pub fn to_floor(&self) -> NativeInt
pub fn floor(&self) -> Self
pub fn to_ceil(&self) -> NativeInt
pub fn ceil(&self) -> Self
Trait Implementations§
Source§impl<const F: u32> Add for NativeFixedU128<F>
impl<const F: u32> Add for NativeFixedU128<F>
Source§impl<const F: u32> Clone for NativeFixedU128<F>
impl<const F: u32> Clone for NativeFixedU128<F>
Source§fn clone(&self) -> NativeFixedU128<F>
fn clone(&self) -> NativeFixedU128<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const F: u32> CvlrLog for NativeFixedU128<F>
impl<const F: u32> CvlrLog for NativeFixedU128<F>
fn log(&self, tag: &str, logger: &mut CvlrLogger)
Source§impl<const F: u32> Debug for NativeFixedU128<F>
impl<const F: u32> Debug for NativeFixedU128<F>
Source§impl<const F: u32> Div for NativeFixedU128<F>
impl<const F: u32> Div for NativeFixedU128<F>
Source§impl<const F: u32> Mul for NativeFixedU128<F>
impl<const F: u32> Mul for NativeFixedU128<F>
Source§impl<const F: u32> Nondet for NativeFixedU128<F>
impl<const F: u32> Nondet for NativeFixedU128<F>
Source§impl<const F: u32> PartialEq for NativeFixedU128<F>
impl<const F: u32> PartialEq for NativeFixedU128<F>
Source§impl<const F: u32> PartialOrd for NativeFixedU128<F>
impl<const F: u32> PartialOrd for NativeFixedU128<F>
Source§impl<const F: u32> Sub for NativeFixedU128<F>
impl<const F: u32> Sub for NativeFixedU128<F>
impl<const F: u32> Copy for NativeFixedU128<F>
impl<const F: u32> Eq for NativeFixedU128<F>
Auto Trait Implementations§
impl<const F: u32> Freeze for NativeFixedU128<F>
impl<const F: u32> RefUnwindSafe for NativeFixedU128<F>
impl<const F: u32> Send for NativeFixedU128<F>
impl<const F: u32> Sync for NativeFixedU128<F>
impl<const F: u32> Unpin for NativeFixedU128<F>
impl<const F: u32> UnwindSafe for NativeFixedU128<F>
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