pub struct C64 {
pub re: f64,
pub im: f64,
}Expand description
Complex number (64-bit floating point).
Fields§
§re: f64§im: f64Implementations§
Source§impl C64
impl C64
pub fn new(re: f64, im: f64) -> Self
pub fn zero() -> Self
pub fn one() -> Self
pub fn i() -> Self
pub fn from_polar(r: f64, theta: f64) -> Self
pub fn modulus(&self) -> f64
pub fn argument(&self) -> f64
pub fn conjugate(&self) -> Self
pub fn add(&self, other: &C64) -> C64
pub fn sub(&self, other: &C64) -> C64
pub fn mul(&self, other: &C64) -> C64
pub fn div(&self, other: &C64) -> Option<C64>
pub fn exp(&self) -> C64
pub fn log(&self) -> Option<C64>
pub fn pow_n(&self, n: i32) -> C64
pub fn sqrt_principal(&self) -> C64
pub fn sin(&self) -> C64
pub fn cos(&self) -> C64
Trait Implementations§
impl Copy for C64
impl StructuralPartialEq for C64
Auto Trait Implementations§
impl Freeze for C64
impl RefUnwindSafe for C64
impl Send for C64
impl Sync for C64
impl Unpin for C64
impl UnsafeUnpin for C64
impl UnwindSafe for C64
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