pub struct ComplexRugRat {
pub r: Rational,
pub i: Rational,
}Expand description
A complex number made of a real part and an imaginary part, both of which are rug::Rationals.
Requires the rug feature.
Fields§
§r: RationalThe real part
i: RationalThe imaginary part
Implementations§
Source§impl ComplexRugRat
impl ComplexRugRat
Trait Implementations§
Source§impl Clone for ComplexRugRat
impl Clone for ComplexRugRat
Source§fn clone(&self) -> ComplexRugRat
fn clone(&self) -> ComplexRugRat
Returns a duplicate 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 Debug for ComplexRugRat
impl Debug for ComplexRugRat
Source§impl Display for ComplexRugRat
impl Display for ComplexRugRat
Source§impl Num for ComplexRugRat
impl Num for ComplexRugRat
Source§fn from_f64(t: f64, _ctx: &Context<Self>) -> Calculation<Self>
fn from_f64(t: f64, _ctx: &Context<Self>) -> Calculation<Self>
Attempts to create an instance of the number from an f64
Source§fn from_f64_complex(
(r, i): (f64, f64),
_ctx: &Context<Self>,
) -> Calculation<Self>
fn from_f64_complex( (r, i): (f64, f64), _ctx: &Context<Self>, ) -> Calculation<Self>
Attempts to create an instance of the number from complex parts. It’s possible the imaginary
part will be ignored for Numbers that don’t support it.
fn tryord( &self, other: &Self, _ctx: &Context<Self>, ) -> Result<Ordering, MathError>
fn add(&self, other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
fn sub(&self, other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
fn mul(&self, other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
fn div(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
fn pow(&self, _other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
fn sqrt(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn nrt(&self, _other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
fn abs(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn sin(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn cos(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn tan(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn asin(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn acos(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn atan(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn atan2(&self, _other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
fn floor(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn ceil(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn round(&self, _ctx: &Context<Self>) -> Calculation<Self>
fn log(&self, _other: &Self, _ctx: &Context<Self>) -> Calculation<Self>
Source§impl PartialEq for ComplexRugRat
impl PartialEq for ComplexRugRat
Auto Trait Implementations§
impl Freeze for ComplexRugRat
impl RefUnwindSafe for ComplexRugRat
impl Send for ComplexRugRat
impl Sync for ComplexRugRat
impl Unpin for ComplexRugRat
impl UnwindSafe for ComplexRugRat
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.