pub struct NativeFixedU64<const F: u32> { /* private fields */ }Expand description
Native Fixed point numbers with F bits of precision
Implementations§
Source§impl<const F: u32> NativeFixedU64<F>
impl<const F: u32> NativeFixedU64<F>
pub fn new(v: NativeInt) -> Self
pub fn one() -> Self
pub fn to_bits(&self) -> u64
pub fn from_bits(bits: u64) -> 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 NativeFixedU64<F>
impl<const F: u32> Add for NativeFixedU64<F>
Source§impl<const F: u32> Clone for NativeFixedU64<F>
impl<const F: u32> Clone for NativeFixedU64<F>
Source§fn clone(&self) -> NativeFixedU64<F>
fn clone(&self) -> NativeFixedU64<F>
Returns a duplicate of the value. Read more
1.0.0§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 NativeFixedU64<F>
impl<const F: u32> CvlrLog for NativeFixedU64<F>
fn log(&self, tag: &str, logger: &mut CvlrLogger)
Source§impl<const F: u32> Debug for NativeFixedU64<F>
impl<const F: u32> Debug for NativeFixedU64<F>
Source§impl<const F: u32> Div for NativeFixedU64<F>
impl<const F: u32> Div for NativeFixedU64<F>
Source§impl<const F: u32> Mul for NativeFixedU64<F>
impl<const F: u32> Mul for NativeFixedU64<F>
Source§impl<const F: u32> Nondet for NativeFixedU64<F>
impl<const F: u32> Nondet for NativeFixedU64<F>
Source§impl<const F: u32> PartialEq for NativeFixedU64<F>
impl<const F: u32> PartialEq for NativeFixedU64<F>
Source§impl<const F: u32> PartialOrd for NativeFixedU64<F>
impl<const F: u32> PartialOrd for NativeFixedU64<F>
Source§impl<const F: u32> Sub for NativeFixedU64<F>
impl<const F: u32> Sub for NativeFixedU64<F>
impl<const F: u32> Copy for NativeFixedU64<F>
impl<const F: u32> Eq for NativeFixedU64<F>
Auto Trait Implementations§
impl<const F: u32> Freeze for NativeFixedU64<F>
impl<const F: u32> RefUnwindSafe for NativeFixedU64<F>
impl<const F: u32> Send for NativeFixedU64<F>
impl<const F: u32> Sync for NativeFixedU64<F>
impl<const F: u32> Unpin for NativeFixedU64<F>
impl<const F: u32> UnwindSafe for NativeFixedU64<F>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)