[−][src]Type Definition hcomplex::Complex
type Complex<T> = Construct<T, T>;
2-dimensional commutative and associative algebra.
Implementations
impl<T: Float> Complex<T>
[src]
pub fn into_num(self) -> NumComplex<T>
[src]
Convert into num_complex::Complex
struct.
pub fn arg(self) -> T
[src]
Calculate the principal Arg of self.
pub fn exp(self) -> Self
[src]
Computes e^(self)
, where e
is the base of the natural logarithm.
pub fn ln(self) -> Self
[src]
Computes the principal value of natural logarithm of self
.
pub fn sqrt(self) -> Self
[src]
Computes the principal value of the square root of self
.
pub fn cbrt(self) -> Self
[src]
Computes the principal value of the cube root of self
.
Note that this does not match the usual result for the cube root of negative real numbers.
For example, the real cube root of -8
is -2
, but the principal complex cube root of -8
is 1 + i√3
.
pub fn powu(self, exp: u32) -> Self
[src]
Raises self
to an unsigned integer power.
pub fn powi(self, exp: i32) -> Self
[src]
Raises self
to a signed integer power.
pub fn powf(self, exp: T) -> Self
[src]
Raises self
to a floating point power.
pub fn powc(self, exp: Self) -> Self
[src]
Raises self
to a complex power.
pub fn log(self, base: T) -> Self
[src]
Returns the logarithm of self
with respect to an arbitrary base.
pub fn expf(self, base: T) -> Self
[src]
Raises a floating point number to the complex power self
.
pub fn sin(self) -> Self
[src]
Computes the sine of self
.
pub fn cos(self) -> Self
[src]
Computes the cosine of self
.
pub fn tan(self) -> Self
[src]
Computes the tangent of self
.
pub fn asin(self) -> Self
[src]
Computes the principal value of the inverse sine of self
.
pub fn acos(self) -> Self
[src]
Computes the principal value of the inverse cosine of self
.
pub fn atan(self) -> Self
[src]
Computes the principal value of the inverse tangent of self
.
pub fn sinh(self) -> Self
[src]
Computes the hyperbolic sine of self
.
pub fn cosh(self) -> Self
[src]
Computes the hyperbolic cosine of self
.
pub fn tanh(self) -> Self
[src]
Computes the hyperbolic tangent of self
.
pub fn asinh(self) -> Self
[src]
Computes the principal value of the inverse hyperbolic sine of self
.
pub fn acosh(self) -> Self
[src]
Computes the principal value of the inverse hyperbolic cosine of self
.
pub fn atanh(self) -> Self
[src]
Computes the principal value of the inverse hyperbolic tangent of self
.
pub fn finv(self) -> Self
[src]
Returns 1/self
using floating-point operations.
impl<T: Float + Clone> Complex<T> where
Self: Norm<Output = T>,
[src]
Self: Norm<Output = T>,
pub fn to_polar(self) -> (T, T)
[src]
Convert to polar form.
pub fn from_polar(r: T, theta: T) -> Self
[src]
Convert a polar representation into a complex number.