Struct easy_complex::EComplex
[−]
[src]
pub struct EComplex { pub arg: f64, pub module: f64, }
Complex number in exponential form (module * **_e_**^( i*argument ))
Fields
arg: f64
module: f64
Methods
impl EComplex
[src]
pub fn new() -> EComplex
[src]
Create new EComplex equal to 0
pub fn new_from(f: &Complex) -> EComplex
[src]
Create new EComplex equivalent to the input Complex
pub fn real(&self) -> f64
[src]
Return real part of the equivalent Complex
pub fn imag(&self) -> f64
[src]
Return imaginary part of the equivalent Complex
pub fn module(&self) -> f64
[src]
Return the module
pub fn arg(&mut self) -> f64
[src]
Return the argument in radians
pub fn argd(&self) -> f64
[src]
Return the argument in degrees
pub fn reduce_arg(&mut self)
[src]
Reduce the argument to a value between [0, 2*PI]
pub fn sqrt(&self) -> Result<Vec<EComplex>, &'static str>
[src]
Return a vector with the square roots
pub fn root(&self, r: usize) -> Result<Vec<EComplex>, &'static str>
[src]
Return a vector of n
values with the n
th roots
pub fn powi(&self, p: isize) -> EComplex
[src]
Return the number raised to the power p
pub fn powf(&self, p: f64) -> EComplex
[src]
Return the number raised to the power p
pub fn conjugate(&self) -> EComplex
[src]
Return the conjugate EComplex
pub fn abs(&self) -> f64
[src]
Return module
pub fn exp(&self) -> EComplex
[src]
Return e^(self)
pub fn ln(&self) -> EComplex
[src]
Return ln(self)
pub fn log(&self, b: f64) -> EComplex
[src]
Return log(self)
in the base b
pub fn inverse(&self) -> EComplex
[src]
Return 1/self
pub fn cos(&self) -> EComplex
[src]
Return the cosine
pub fn sin(&self) -> EComplex
[src]
Return the sine
pub fn tan(&self) -> Option<EComplex>
[src]
Return the tangent
pub fn cosh(&self) -> EComplex
[src]
Return the hyperolic cosine
pub fn sinh(&self) -> EComplex
[src]
Return the hyperbolic sine
pub fn tanh(&self) -> EComplex
[src]
Return the hyperbolic tangent
pub fn tuple(&self) -> (f64, f64)
[src]
Return the module and argument as a tuple (mod, arg)
pub fn c_tuple(&self) -> (f64, f64)
[src]
Return as a tuple the real and imaginary part of the equivalent Complex (real, imag)
Trait Implementations
impl Debug for EComplex
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for EComplex
[src]
fn clone(&self) -> EComplex
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for EComplex
[src]
impl ComplexNumber for EComplex
[src]
impl From<EComplex> for Complex
[src]
impl From<Complex> for EComplex
[src]
impl Display for EComplex
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq<Complex> for EComplex
[src]
fn eq(&self, other: &Complex) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Complex) -> bool
[src]
This method tests for !=
.
impl PartialEq<EComplex> for Complex
[src]
fn eq(&self, other: &EComplex) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &EComplex) -> bool
[src]
This method tests for !=
.
impl PartialEq for EComplex
[src]
fn eq(&self, other: &EComplex) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &EComplex) -> bool
[src]
This method tests for !=
.
impl Add<EComplex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the +
operator.
fn add(self, other: EComplex) -> EComplex
[src]
Performs the +
operation.
impl<'a, 'b> Add<&'b EComplex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the +
operator.
fn add(self, other: &'b EComplex) -> EComplex
[src]
Performs the +
operation.
impl Add<Complex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the +
operator.
fn add(self, other: Complex) -> EComplex
[src]
Performs the +
operation.
impl<'a, 'b> Add<&'b Complex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the +
operator.
fn add(self, other: &'b Complex) -> EComplex
[src]
Performs the +
operation.
impl Add<EComplex> for Complex
[src]
type Output = Complex
The resulting type after applying the +
operator.
fn add(self, other: EComplex) -> Complex
[src]
Performs the +
operation.
impl<'a, 'b> Add<&'b EComplex> for &'a Complex
[src]
type Output = Complex
The resulting type after applying the +
operator.
fn add(self, other: &'b EComplex) -> Complex
[src]
Performs the +
operation.
impl Neg for EComplex
[src]
type Output = EComplex
The resulting type after applying the -
operator.
fn neg(self) -> EComplex
[src]
Performs the unary -
operation.
impl<'a> Neg for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the -
operator.
fn neg(self) -> EComplex
[src]
Performs the unary -
operation.
impl Sub<EComplex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the -
operator.
fn sub(self, other: EComplex) -> EComplex
[src]
Performs the -
operation.
impl<'a, 'b> Sub<&'b EComplex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the -
operator.
fn sub(self, other: &'b EComplex) -> EComplex
[src]
Performs the -
operation.
impl Sub<Complex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the -
operator.
fn sub(self, other: Complex) -> EComplex
[src]
Performs the -
operation.
impl<'a, 'b> Sub<&'b Complex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the -
operator.
fn sub(self, other: &'b Complex) -> EComplex
[src]
Performs the -
operation.
impl Sub<EComplex> for Complex
[src]
type Output = Complex
The resulting type after applying the -
operator.
fn sub(self, other: EComplex) -> Complex
[src]
Performs the -
operation.
impl<'a, 'b> Sub<&'b EComplex> for &'a Complex
[src]
type Output = Complex
The resulting type after applying the -
operator.
fn sub(self, other: &'b EComplex) -> Complex
[src]
Performs the -
operation.
impl Mul<EComplex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the *
operator.
fn mul(self, other: EComplex) -> EComplex
[src]
Performs the *
operation.
impl<'a, 'b> Mul<&'b EComplex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the *
operator.
fn mul(self, other: &'b EComplex) -> EComplex
[src]
Performs the *
operation.
impl Mul<Complex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the *
operator.
fn mul(self, other: Complex) -> EComplex
[src]
Performs the *
operation.
impl<'a, 'b> Mul<&'b Complex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the *
operator.
fn mul(self, other: &'b Complex) -> EComplex
[src]
Performs the *
operation.
impl Mul<EComplex> for Complex
[src]
type Output = Complex
The resulting type after applying the *
operator.
fn mul(self, other: EComplex) -> Complex
[src]
Performs the *
operation.
impl<'a, 'b> Mul<&'b EComplex> for &'a Complex
[src]
type Output = Complex
The resulting type after applying the *
operator.
fn mul(self, other: &'b EComplex) -> Complex
[src]
Performs the *
operation.
impl Div<EComplex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the /
operator.
fn div(self, other: EComplex) -> EComplex
[src]
Performs the /
operation.
impl<'a, 'b> Div<&'b EComplex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the /
operator.
fn div(self, other: &'b EComplex) -> EComplex
[src]
Performs the /
operation.
impl Div<Complex> for EComplex
[src]
type Output = EComplex
The resulting type after applying the /
operator.
fn div(self, other: Complex) -> EComplex
[src]
Performs the /
operation.
impl<'a, 'b> Div<&'b Complex> for &'a EComplex
[src]
type Output = EComplex
The resulting type after applying the /
operator.
fn div(self, other: &'b Complex) -> EComplex
[src]
Performs the /
operation.
impl Div<EComplex> for Complex
[src]
type Output = Complex
The resulting type after applying the /
operator.
fn div(self, other: EComplex) -> Complex
[src]
Performs the /
operation.