Struct agb_fixnum::Num
source · [−]#[repr(C)]pub struct Num<I: FixedWidthUnsignedInteger, const N: usize>(_);Implementations
sourceimpl<I: FixedWidthUnsignedInteger, const N: usize> Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> Num<I, N>
pub fn change_base<J: FixedWidthUnsignedInteger + From<I>, const M: usize>(
self
) -> Num<J, M>
pub fn from_raw(n: I) -> Self
pub fn to_raw(self) -> I
pub fn trunc(self) -> I
pub fn rem_euclid(self, rhs: Self) -> Self
pub fn floor(self) -> I
pub fn frac(self) -> I
pub fn new(integral: I) -> Self
pub fn new_from_parts(num: (i32, i32)) -> Self
Trait Implementations
sourceimpl<I, T, const N: usize> Add<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
impl<I, T, const N: usize> Add<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
sourceimpl<I, T, const N: usize> AddAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
impl<I, T, const N: usize> AddAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
sourcefn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the += operation. Read more
sourceimpl<I: FixedWidthUnsignedInteger, const N: usize> Debug for Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> Debug for Num<I, N>
sourceimpl<I, const N: usize> Default for Num<I, N> where
I: FixedWidthUnsignedInteger,
impl<I, const N: usize> Default for Num<I, N> where
I: FixedWidthUnsignedInteger,
sourceimpl<I: FixedWidthUnsignedInteger, const N: usize> Display for Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> Display for Num<I, N>
sourceimpl<I, const N: usize> Div<I> for Num<I, N> where
I: FixedWidthUnsignedInteger,
impl<I, const N: usize> Div<I> for Num<I, N> where
I: FixedWidthUnsignedInteger,
sourceimpl<I, T, const N: usize> DivAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
Num<I, N>: Div<T, Output = Num<I, N>>,
impl<I, T, const N: usize> DivAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
Num<I, N>: Div<T, Output = Num<I, N>>,
sourcefn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the /= operation. Read more
sourceimpl<I: FixedWidthUnsignedInteger, const N: usize> From<I> for Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> From<I> for Num<I, N>
sourceimpl<I, const N: usize> Mul<I> for Num<I, N> where
I: FixedWidthUnsignedInteger,
impl<I, const N: usize> Mul<I> for Num<I, N> where
I: FixedWidthUnsignedInteger,
sourceimpl<I, T, const N: usize> MulAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
Num<I, N>: Mul<T, Output = Num<I, N>>,
impl<I, T, const N: usize> MulAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
Num<I, N>: Mul<T, Output = Num<I, N>>,
sourcefn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the *= operation. Read more
sourceimpl<I: FixedWidthSignedInteger, const N: usize> Neg for Num<I, N>
impl<I: FixedWidthSignedInteger, const N: usize> Neg for Num<I, N>
sourceimpl<I: Ord + FixedWidthUnsignedInteger, const N: usize> Ord for Num<I, N>
impl<I: Ord + FixedWidthUnsignedInteger, const N: usize> Ord for Num<I, N>
sourceimpl<I: PartialEq + FixedWidthUnsignedInteger, const N: usize> PartialEq<Num<I, N>> for Num<I, N>
impl<I: PartialEq + FixedWidthUnsignedInteger, const N: usize> PartialEq<Num<I, N>> for Num<I, N>
sourceimpl<I: PartialOrd + FixedWidthUnsignedInteger, const N: usize> PartialOrd<Num<I, N>> for Num<I, N>
impl<I: PartialOrd + FixedWidthUnsignedInteger, const N: usize> PartialOrd<Num<I, N>> for Num<I, N>
sourcefn partial_cmp(&self, other: &Num<I, N>) -> Option<Ordering>
fn partial_cmp(&self, other: &Num<I, N>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl<I, T, const N: usize> Rem<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
impl<I, T, const N: usize> Rem<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
sourceimpl<I, T, const N: usize> RemAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
impl<I, T, const N: usize> RemAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
sourcefn rem_assign(&mut self, modulus: T)
fn rem_assign(&mut self, modulus: T)
Performs the %= operation. Read more
sourceimpl<I, T, const N: usize> Sub<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
impl<I, T, const N: usize> Sub<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
sourceimpl<I, T, const N: usize> SubAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
impl<I, T, const N: usize> SubAssign<T> for Num<I, N> where
I: FixedWidthUnsignedInteger,
T: Into<Num<I, N>>,
sourcefn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the -= operation. Read more
impl<I: Copy + FixedWidthUnsignedInteger, const N: usize> Copy for Num<I, N>
impl<I: Eq + FixedWidthUnsignedInteger, const N: usize> Eq for Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> Number for Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> StructuralEq for Num<I, N>
impl<I: FixedWidthUnsignedInteger, const N: usize> StructuralPartialEq for Num<I, N>
Auto Trait Implementations
impl<I, const N: usize> RefUnwindSafe for Num<I, N> where
I: RefUnwindSafe,
impl<I, const N: usize> Send for Num<I, N> where
I: Send,
impl<I, const N: usize> Sync for Num<I, N> where
I: Sync,
impl<I, const N: usize> Unpin for Num<I, N> where
I: Unpin,
impl<I, const N: usize> UnwindSafe for Num<I, N> where
I: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more