pub struct Complex<T> { /* private fields */ }
Expand description
Complex number.
Implementations§
Source§impl<T> Complex<T>
impl<T> Complex<T>
pub fn new(w: T, x: T) -> Self
pub fn from_vector(vec: Vector2<T>) -> Self
pub fn from_array(arr: [T; 2]) -> Self
pub fn from_tuple(tup: (T, T)) -> Self
pub fn from_num(nc: NumComplex<T>) -> Self
pub fn into_vector(self) -> Vector2<T>
pub fn into_array(self) -> [T; 2]
pub fn into_tuple(self) -> (T, T)
pub fn into_num(self) -> NumComplex<T>
Source§impl<T: Float> Complex<T>
impl<T: Float> Complex<T>
pub fn exp(self) -> Self
pub fn ln(self) -> Self
pub fn sqrt(self) -> Self
pub fn cbrt(self) -> Self
pub fn powf(self, exp: T) -> Self
pub fn log(self, base: T) -> Self
pub fn powc(self, exp: Self) -> Self
pub fn expf(self, base: T) -> Self
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn asin(self) -> Self
pub fn acos(self) -> Self
pub fn atan(self) -> Self
pub fn sinh(self) -> Self
pub fn cosh(self) -> Self
pub fn tanh(self) -> Self
pub fn asinh(self) -> Self
pub fn acosh(self) -> Self
pub fn atanh(self) -> Self
pub fn finv(self) -> Self
pub fn fdiv(self, other: Self) -> Self
Trait Implementations§
Source§impl<T> AbsDiffEq for Complex<T>
impl<T> AbsDiffEq for Complex<T>
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq
.Source§impl<T> AddAssign<Complex<T>> for Quaternion<T>where
T: AddAssign,
impl<T> AddAssign<Complex<T>> for Quaternion<T>where
T: AddAssign,
Source§fn add_assign(&mut self, other: Complex<T>)
fn add_assign(&mut self, other: Complex<T>)
Performs the
+=
operation. Read moreSource§impl<T> AddAssign<T> for Complex<T>where
T: AddAssign,
impl<T> AddAssign<T> for Complex<T>where
T: AddAssign,
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Performs the
+=
operation. Read moreSource§impl<T> AddAssign for Complex<T>where
T: AddAssign,
impl<T> AddAssign for Complex<T>where
T: AddAssign,
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl<T> Directional<Complex<T>> for Moebius<Complex<T>>
impl<T> Directional<Complex<T>> for Moebius<Complex<T>>
Source§impl<T: Float> Distribution<Complex<T>> for NonZero
impl<T: Float> Distribution<Complex<T>> for NonZero
Source§impl<T> Distribution<Complex<T>> for Normal
impl<T> Distribution<Complex<T>> for Normal
Source§impl<T: Float> Distribution<Complex<T>> for Unit
impl<T: Float> Distribution<Complex<T>> for Unit
Source§impl<T> Div<Complex<T>> for Quaternion<T>
impl<T> Div<Complex<T>> for Quaternion<T>
Source§impl<T> Div<Quaternion<T>> for Complex<T>
impl<T> Div<Quaternion<T>> for Complex<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
The resulting type after applying the
/
operator.Source§impl<T> DivAssign<Complex<T>> for Quaternion<T>
impl<T> DivAssign<Complex<T>> for Quaternion<T>
Source§fn div_assign(&mut self, other: Complex<T>)
fn div_assign(&mut self, other: Complex<T>)
Performs the
/=
operation. Read moreSource§impl<T> DivAssign<T> for Complex<T>
impl<T> DivAssign<T> for Complex<T>
Source§fn div_assign(&mut self, other: T)
fn div_assign(&mut self, other: T)
Performs the
/=
operation. Read moreSource§impl<T> DivAssign for Complex<T>
impl<T> DivAssign for Complex<T>
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moreSource§impl<T> From<Complex<T>> for Complex<T>
impl<T> From<Complex<T>> for Complex<T>
Source§fn from(nc: NumComplex<T>) -> Self
fn from(nc: NumComplex<T>) -> Self
Converts to this type from the input type.
Source§impl<T> Mul<Complex<T>> for Quaternion<T>
impl<T> Mul<Complex<T>> for Quaternion<T>
Source§impl<T> Mul<Quaternion<T>> for Complex<T>
impl<T> Mul<Quaternion<T>> for Complex<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
The resulting type after applying the
*
operator.Source§impl<T> MulAssign<Complex<T>> for Quaternion<T>
impl<T> MulAssign<Complex<T>> for Quaternion<T>
Source§fn mul_assign(&mut self, other: Complex<T>)
fn mul_assign(&mut self, other: Complex<T>)
Performs the
*=
operation. Read moreSource§impl<T> MulAssign<T> for Complex<T>
impl<T> MulAssign<T> for Complex<T>
Source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*=
operation. Read moreSource§impl<T> MulAssign for Complex<T>
impl<T> MulAssign for Complex<T>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl<T: Neg<Output = T> + Num + Copy> Num for Complex<T>
impl<T: Neg<Output = T> + Num + Copy> Num for Complex<T>
type FromStrRadixErr = ParseComplexError<<T as Num>::FromStrRadixErr>
Source§fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moreSource§impl<T> SubAssign<Complex<T>> for Quaternion<T>where
T: SubAssign,
impl<T> SubAssign<Complex<T>> for Quaternion<T>where
T: SubAssign,
Source§fn sub_assign(&mut self, other: Complex<T>)
fn sub_assign(&mut self, other: Complex<T>)
Performs the
-=
operation. Read moreSource§impl<T> SubAssign<T> for Complex<T>where
T: SubAssign,
impl<T> SubAssign<T> for Complex<T>where
T: SubAssign,
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-=
operation. Read moreSource§impl<T> SubAssign for Complex<T>where
T: SubAssign,
impl<T> SubAssign for Complex<T>where
T: SubAssign,
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreSource§impl<T> Transform<Complex<T>> for Moebius<Complex<T>>
impl<T> Transform<Complex<T>> for Moebius<Complex<T>>
impl<T: Copy> Copy for Complex<T>
impl<T> StructuralPartialEq for Complex<T>
Auto Trait Implementations§
impl<T> Freeze for Complex<T>where
T: Freeze,
impl<T> RefUnwindSafe for Complex<T>where
T: RefUnwindSafe,
impl<T> Send for Complex<T>where
T: Send,
impl<T> Sync for Complex<T>where
T: Sync,
impl<T> Unpin for Complex<T>where
T: Unpin,
impl<T> UnwindSafe for Complex<T>where
T: UnwindSafe,
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