pub struct Complex {
pub val: Complex,
}Fields§
§val: ComplexImplementations§
Trait Implementations§
Source§impl<'a> AddAssign<&'a Complex> for Complex
impl<'a> AddAssign<&'a Complex> for Complex
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
Performs the
+= operation. Read moreSource§impl<B> AddAssign<B> for Complex
impl<B> AddAssign<B> for Complex
Source§fn add_assign(&mut self, rhs: B)
fn add_assign(&mut self, rhs: B)
Performs the
+= operation. Read moreSource§impl AddAssign for Complex
impl AddAssign for Complex
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl CheckedAdd for Complex
impl CheckedAdd for Complex
Source§fn checked_add(&self, v: &Self) -> Option<Self>
fn checked_add(&self, v: &Self) -> Option<Self>
Adds two numbers, checking for overflow. If overflow happens,
None is
returned.Source§impl CheckedDiv for Complex
impl CheckedDiv for Complex
Source§fn checked_div(&self, v: &Self) -> Option<Self>
fn checked_div(&self, v: &Self) -> Option<Self>
Divides two numbers, checking for underflow, overflow and division by
zero. If any of that happens,
None is returned.Source§impl CheckedMul for Complex
impl CheckedMul for Complex
Source§fn checked_mul(&self, v: &Self) -> Option<Self>
fn checked_mul(&self, v: &Self) -> Option<Self>
Multiplies two numbers, checking for underflow or overflow. If underflow
or overflow happens,
None is returned.Source§impl CheckedNeg for Complex
impl CheckedNeg for Complex
Source§fn checked_neg(&self) -> Option<Self>
fn checked_neg(&self) -> Option<Self>
Negates a number, returning
None for results that can’t be represented, like signed MIN
values that can’t be positive, or non-zero unsigned values that can’t be negative. Read moreSource§impl CheckedSub for Complex
impl CheckedSub for Complex
Source§fn checked_sub(&self, v: &Self) -> Option<Self>
fn checked_sub(&self, v: &Self) -> Option<Self>
Subtracts two numbers, checking for underflow. If underflow happens,
None is returned.Source§impl ComplexSubset for Complex
impl ComplexSubset for Complex
type Real = Float
type Natural = Integer
type Integer = Integer
Source§fn as_real(self) -> Self::Real
fn as_real(self) -> Self::Real
Converts
self to a real number, discarding any imaginary component, if complex.Source§fn as_natural(self) -> Self::Natural
fn as_natural(self) -> Self::Natural
Converts
self to a natural number, truncating when necessary.Source§fn as_integer(self) -> Self::Integer
fn as_integer(self) -> Self::Integer
Converts
self to an integer, truncating when necessary.Source§fn floor(self) -> Self
fn floor(self) -> Self
Rounds the real and imaginary components of
self to the closest integer downwardSource§fn ceil(self) -> Self
fn ceil(self) -> Self
Rounds the real and imaginary components of
self to the closest integer upwardSource§fn round(self) -> Self
fn round(self) -> Self
Rounds the real and imaginary components of
self to the closest integerSource§fn trunc(self) -> Self
fn trunc(self) -> Self
Rounds the real and imaginary components of
self by removing the factional partsSource§fn fract(self) -> Self
fn fract(self) -> Self
Removes the integral parts of the real and imaginary components of
selfSource§fn modulus_sqrd(self) -> Self
fn modulus_sqrd(self) -> Self
The square of the complex absolute value of
self Read moreSource§impl<'a> DivAssign<&'a Complex> for Complex
impl<'a> DivAssign<&'a Complex> for Complex
Source§fn div_assign(&mut self, rhs: &Self)
fn div_assign(&mut self, rhs: &Self)
Performs the
/= operation. Read moreSource§impl<B> DivAssign<B> for Complex
impl<B> DivAssign<B> for Complex
Source§fn div_assign(&mut self, rhs: B)
fn div_assign(&mut self, rhs: B)
Performs the
/= operation. Read moreSource§impl DivAssign for Complex
impl DivAssign for Complex
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl Divisibility for Complex
impl Divisibility for Complex
Source§impl Exponential for Complex
impl Exponential for Complex
Source§impl<'a> MulAssign<&'a Complex> for Complex
impl<'a> MulAssign<&'a Complex> for Complex
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
Performs the
*= operation. Read moreSource§impl<B> MulAssign<B> for Complex
impl<B> MulAssign<B> for Complex
Source§fn mul_assign(&mut self, rhs: B)
fn mul_assign(&mut self, rhs: B)
Performs the
*= operation. Read moreSource§impl MulAssign for Complex
impl MulAssign for Complex
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl RealExponential for Complex
impl RealExponential for Complex
Source§fn try_pow(self, power: Self) -> Option<Self>
fn try_pow(self, power: Self) -> Option<Self>
This element raised to the given power as defined by
x^y = exp(ln(x)*y), if ln(x) existsSource§fn try_root(self, index: Self) -> Option<Self>
fn try_root(self, index: Self) -> Option<Self>
This element taken to the given root as defined as
root(x, y) = x^(1/y), if ln(x) and 1/y existfn sqrt(self) -> Self
fn cbrt(self) -> Self
Source§fn e() -> Self
fn e() -> Self
The exponential of 1. Mirrors ::core::f32::consts::E
Source§fn ln_2() -> Self
fn ln_2() -> Self
The natural logarithm of 2. Mirrors ::core::f32::consts::LN_2
Source§fn ln_10() -> Self
fn ln_10() -> Self
The natural logarithm of 10. Mirrors ::core::f32::consts::LN_10
Source§fn log2_e() -> Self
fn log2_e() -> Self
The logarithm base 2 of e. Mirrors ::core::f32::consts::LOG2_E
Source§fn log10_e() -> Self
fn log10_e() -> Self
The logarithm base 10 of e. Mirrors ::core::f32::consts::LOG10_E
Source§fn log2_10() -> Self
fn log2_10() -> Self
The logarithm base 2 of 10. Mirrors ::core::f32::consts::LOG2_10
Source§fn log10_2() -> Self
fn log10_2() -> Self
The logarithm base 10 of 2. Mirrors ::core::f32::consts::LOG10_2
Source§fn sqrt_2() -> Self
fn sqrt_2() -> Self
The square root of 2. Mirrors ::core::f32::consts::SQRT_2
Source§fn frac_1_sqrt_2() -> Self
fn frac_1_sqrt_2() -> Self
One over the square root of 2. Mirrors ::core::f32::consts::FRAC_1_SQRT_2
Source§impl<'a> SubAssign<&'a Complex> for Complex
impl<'a> SubAssign<&'a Complex> for Complex
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
Performs the
-= operation. Read moreSource§impl<B> SubAssign<B> for Complex
impl<B> SubAssign<B> for Complex
Source§fn sub_assign(&mut self, rhs: B)
fn sub_assign(&mut self, rhs: B)
Performs the
-= operation. Read moreSource§impl SubAssign for Complex
impl SubAssign for Complex
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl Trig for Complex
impl Trig for Complex
Source§fn atan2(_y: Self, _x: Self) -> Self
fn atan2(_y: Self, _x: Self) -> Self
A continuous function of two variables where
tan(atan2(y,x)) = y/x for y!=0 and atan2(0,1) = 0 Read moreSource§fn pythag_const() -> Self
fn pythag_const() -> Self
The length of the hypotenuse of a unit right-triangle. Mirrors SQRT_2
Source§fn pythag_const_inv() -> Self
fn pythag_const_inv() -> Self
The sine of
π/4. Mirrors FRAC_1_SQRT_2fn to_degrees(self) -> Self
fn to_radians(self) -> Self
impl AddAssociative for Complex
impl AddCommutative for Complex
impl Distributive for Complex
impl MulAssociative for Complex
impl MulCommutative for Complex
impl NoZeroDivisors for Complex
impl StructuralPartialEq for Complex
Auto Trait Implementations§
impl Freeze for Complex
impl RefUnwindSafe for Complex
impl Send for Complex
impl Sync for Complex
impl Unpin for Complex
impl UnwindSafe for Complex
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<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<G> MulN for Gwhere
G: AddSemigroup + Zero,
impl<G> MulN for Gwhere
G: AddSemigroup + Zero,
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<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<G> PowN for Gwhere
G: MulSemigroup + One,
impl<G> PowN for Gwhere
G: MulSemigroup + One,
Source§impl<G> PowZ for Gwhere
G: MulMonoid + Invertable,
impl<G> PowZ for Gwhere
G: MulMonoid + Invertable,
fn pow_z<Z>(self, n: Z) -> Selfwhere
Z: IntegerSubset,
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<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> 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<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> 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.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.