Struct comlib_math::Quot [−][src]
pub struct Quot<T: Integer> { /* fields omitted */ }Expand description
A quotient. Represents a rational number as numerator/denominator.
The denominator is stored as non-zeroable type, so this type benefits from the niche optimization.
Implementations
Constructs a new Quot from a numerator and a denominator.
Return None if the denominator is 0.
Constructs a new Quot from a numerator and a non-zero denominator.
Gets the denominator of the quotient.
Truncates the quotient.
This gives out the integral part of the quotient.
Trait Implementations
Performs the += operation. Read more
Performs the /= operation. Read more
Performs the *= operation. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Performs the %= operation. Read more
Performs the -= operation. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Quot<T> where
T: RefUnwindSafe,
<T as Integer>::NonZero: RefUnwindSafe,
impl<T> UnwindSafe for Quot<T> where
T: UnwindSafe,
<T as Integer>::NonZero: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more