Struct sp_arithmetic::rational::RationalInfinite [−][src]
A wrapper for any rational number with infinitely large numerator and denominator.
This type exists to facilitate cmp
operation
on values like a/b < c/d
where a, b, c, d
are all BigUint
.
Implementations
impl RationalInfinite
[src]
pub fn n(&self) -> &BigUint
[src]
Return the numerator reference.
pub fn d(&self) -> &BigUint
[src]
Return the denominator reference.
pub fn from(n: BigUint, d: BigUint) -> Self
[src]
Build from a raw n/d
.
pub fn zero() -> Self
[src]
Zero.
pub fn one() -> Self
[src]
One.
Trait Implementations
impl Clone for RationalInfinite
[src]
fn clone(&self) -> RationalInfinite
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for RationalInfinite
[src]
fn default() -> RationalInfinite
[src]
impl Eq for RationalInfinite
[src]
impl From<Rational128> for RationalInfinite
[src]
fn from(t: Rational128) -> Self
[src]
impl Ord for RationalInfinite
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<RationalInfinite> for RationalInfinite
[src]
impl PartialOrd<RationalInfinite> for RationalInfinite
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for RationalInfinite
[src]
Auto Trait Implementations
impl RefUnwindSafe for RationalInfinite
[src]
impl Send for RationalInfinite
[src]
impl Sync for RationalInfinite
[src]
impl Unpin for RationalInfinite
[src]
impl UnwindSafe for RationalInfinite
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SaturatedConversion for T
[src]
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
T: Bounded,
S: TryInto<T>,