Expand description
A complex number.
Variants
C32(Complex<f32>)
C64(Complex<f64>)
Implementations
Trait Implementations
sourceimpl AddAssign<Complex> for Complex
impl AddAssign<Complex> for Complex
sourcefn add_assign(&mut self, other: Complex)
fn add_assign(&mut self, other: Complex)
Performs the +=
operation. Read more
sourceimpl<'de> Deserialize<'de> for Complex
impl<'de> Deserialize<'de> for Complex
sourcefn deserialize<D>(
deserializer: D
) -> Result<Complex, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Complex, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl DivAssign<Complex> for Complex
impl DivAssign<Complex> for Complex
sourcefn div_assign(&mut self, other: Complex)
fn div_assign(&mut self, other: Complex)
Performs the /=
operation. Read more
sourceimpl FloatInstance for Complex
impl FloatInstance for Complex
sourcefn is_infinite(&self) -> bool
fn is_infinite(&self) -> bool
Return true
if this Number
is infinite (e.g. f32::INFINITY
).
sourceimpl FromStream for Complex
impl FromStream for Complex
type Context = ()
type Context = ()
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
sourcefn from_stream<'life0, 'async_trait, D>(
cxt: <Complex as FromStream>::Context,
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Complex, <D as Decoder>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
D: 'async_trait + Decoder,
Complex: 'async_trait,
fn from_stream<'life0, 'async_trait, D>(
cxt: <Complex as FromStream>::Context,
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Complex, <D as Decoder>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
D: 'async_trait + Decoder,
Complex: 'async_trait,
Parse this value using the given Decoder
.
sourceimpl<'en> IntoStream<'en> for Complex
impl<'en> IntoStream<'en> for Complex
sourceimpl MulAssign<Complex> for Complex
impl MulAssign<Complex> for Complex
sourcefn mul_assign(&mut self, other: Complex)
fn mul_assign(&mut self, other: Complex)
Performs the *=
operation. Read more
sourceimpl NumberInstance for Complex
impl NumberInstance for Complex
type Abs = Float
type Exp = Complex
type Log = Complex
type Round = Complex
type Class = ComplexType
sourcefn class(&self) -> ComplexType
fn class(&self) -> ComplexType
Get an impl of NumberClass
describing this number.
sourcefn into_type(self, dtype: ComplexType) -> Complex
fn into_type(self, dtype: ComplexType) -> Complex
Cast this number into the specified NumberClass
.
sourcefn exp(self) -> <Complex as NumberInstance>::Exp
fn exp(self) -> <Complex as NumberInstance>::Exp
Raise e
to the power of this number.
sourcefn ln(self) -> <Complex as NumberInstance>::Log
fn ln(self) -> <Complex as NumberInstance>::Log
Compute the natural logarithm of this number.
sourcefn log<N>(self, base: N) -> <Complex as NumberInstance>::Logwhere
N: NumberInstance,
Float: From<N>,
fn log<N>(self, base: N) -> <Complex as NumberInstance>::Logwhere
N: NumberInstance,
Float: From<N>,
Compute the logarithm of this number with respect to the given base
.
sourcefn round(self) -> <Complex as NumberInstance>::Round
fn round(self) -> <Complex as NumberInstance>::Round
Return this number rounded to the nearest integer.
sourcefn and(self, other: Self) -> Selfwhere
Boolean: CastFrom<Self>,
fn and(self, other: Self) -> Selfwhere
Boolean: CastFrom<Self>,
Return true
if self
and other
are nonzero.
sourceimpl PartialEq<Complex> for Complex
impl PartialEq<Complex> for Complex
sourceimpl Serialize for Complex
impl Serialize for Complex
sourcefn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl SubAssign<Complex> for Complex
impl SubAssign<Complex> for Complex
sourcefn sub_assign(&mut self, other: Complex)
fn sub_assign(&mut self, other: Complex)
Performs the -=
operation. Read more
sourceimpl Trigonometry for Complex
impl Trigonometry for Complex
impl Copy for Complex
impl Eq for Complex
Auto Trait Implementations
impl RefUnwindSafe for Complex
impl Send for Complex
impl Sync for Complex
impl Unpin for Complex
impl UnwindSafe for Complex
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err>where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err>where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns Some(T)
if self
can be cast into T
, otherwise None
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err>where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err>where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.