# Struct rcomplex::complex::Complex
[−]
[src]

pub struct Complex { pub real: f64, pub img: f64, }

## Fields

`real: f64`

`img: f64`

## Methods

`impl Complex`

[src]

`fn new(real: f64, img: f64) -> Complex`

[src]

`fn i() -> Complex`

[src]

`fn to_polar(&self) -> Polar`

[src]

`fn conjugate(&self) -> Complex`

[src]

`fn exp(&self) -> Complex`

[src]

`fn modulus(&self) -> f64`

[src]

`fn cos(&self) -> Complex`

[src]

`fn sin(&self) -> Complex`

[src]

## Trait Implementations

`impl Copy for Complex`

[src]

`impl Clone for Complex`

[src]

`fn clone(&self) -> Complex`

[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 Debug for Complex`

[src]

`impl Default for Complex`

[src]

`impl Neg for Complex`

[src]

`type Output = Complex`

The resulting type after applying the `-`

operator.

`fn neg(self) -> Complex`

[src]

Performs the unary `-`

operation.

`impl Add<Complex> for Complex`

[src]

`type Output = Complex`

The resulting type after applying the `+`

operator.

`fn add(self, other: Complex) -> Complex`

[src]

Performs the `+`

operation.

`impl PartialEq for Complex`

[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: &Rhs) -> bool`

1.0.0[src]

This method tests for `!=`

.

`impl Sub<Complex> for Complex`

[src]

`type Output = Complex`

The resulting type after applying the `-`

operator.

`fn sub(self, other: Complex) -> Complex`

[src]

Performs the `-`

operation.

`impl Mul<Complex> for Complex`

[src]

`type Output = Complex`

The resulting type after applying the `*`

operator.

`fn mul(self, other: Complex) -> Complex`

[src]

Performs the `*`

operation.

`impl Mul<f64> for Complex`

[src]

`type Output = Complex`

The resulting type after applying the `*`

operator.

`fn mul(self, other: f64) -> Complex`

[src]

Performs the `*`

operation.

`impl Div<f64> for Complex`

[src]

`type Output = Complex`

The resulting type after applying the `/`

operator.

`fn div(self, other: f64) -> Complex`

[src]

Performs the `/`

operation.