pub struct Complex {
pub re: f64,
pub im: f64,
}Fields§
§re: f64§im: f64Implementations§
Source§impl Complex
impl Complex
pub fn new(re: f64, im: f64) -> Self
pub fn from_polar(r: f64, theta: f64) -> Self
pub fn i() -> Self
pub fn zero() -> Self
pub fn one() -> Self
pub fn conj(&self) -> Self
pub fn norm_sq(&self) -> f64
pub fn norm(&self) -> f64
pub fn arg(&self) -> f64
pub fn inv(&self) -> Self
pub fn exp(&self) -> Self
pub fn ln(&self) -> Self
pub fn pow(&self, n: Self) -> Self
pub fn pow_f64(&self, n: f64) -> Self
pub fn sqrt(&self) -> Self
pub fn sin(&self) -> Self
pub fn cos(&self) -> Self
pub fn tan(&self) -> Self
pub fn sinh(&self) -> Self
pub fn cosh(&self) -> Self
pub fn tanh(&self) -> Self
pub fn scale(&self, s: f64) -> Self
Trait Implementations§
impl Copy 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 UnsafeUnpin 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