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) -> Complex
pub fn from_polar(r: f64, theta: f64) -> Complex
pub fn i() -> Complex
pub fn zero() -> Complex
pub fn one() -> Complex
pub fn conj(&self) -> Complex
pub fn norm_sq(&self) -> f64
pub fn norm(&self) -> f64
pub fn arg(&self) -> f64
pub fn inv(&self) -> Complex
pub fn exp(&self) -> Complex
pub fn ln(&self) -> Complex
pub fn pow(&self, n: Complex) -> Complex
pub fn pow_f64(&self, n: f64) -> Complex
pub fn sqrt(&self) -> Complex
pub fn sin(&self) -> Complex
pub fn cos(&self) -> Complex
pub fn tan(&self) -> Complex
pub fn sinh(&self) -> Complex
pub fn cosh(&self) -> Complex
pub fn tanh(&self) -> Complex
pub fn scale(&self, s: f64) -> Complex
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