NumericAccess

Trait NumericAccess 

Source
pub trait NumericAccess: Sized
where Numeric: From<Self>,
{
Show 13 methods // Provided methods fn pow(self, exponent: impl Into<Numeric>) -> Numeric { ... } fn real(self) -> Numeric { ... } fn imaginary(self) -> Numeric { ... } fn arg(self) -> Numeric { ... } fn point(self) -> Point { ... } fn ln(self) -> Numeric { ... } fn exp(self) -> Numeric { ... } fn sin(self) -> Numeric { ... } fn cos(self) -> Numeric { ... } fn asin(self) -> Numeric { ... } fn acos(self) -> Numeric { ... } fn atan(self) -> Numeric { ... } fn normalize(self) -> Numeric { ... }
}
Expand description

Trait for accessing numeric functions

Provided Methods§

Source

fn pow(self, exponent: impl Into<Numeric>) -> Numeric

Raise the number to a power

Source

fn real(self) -> Numeric

Get the real part of this number

Source

fn imaginary(self) -> Numeric

Get the imaginary part of this number

Source

fn arg(self) -> Numeric

Get this complex number’s argument

Source

fn point(self) -> Point

Convert this number to a point

Source

fn ln(self) -> Numeric

Natural logarithm (base e)

Source

fn exp(self) -> Numeric

Exponential function (e^this)

Source

fn sin(self) -> Numeric

Get the sine of this angle.

Source

fn cos(self) -> Numeric

Get the cosine of this angle.

Source

fn asin(self) -> Numeric

Get the arcsine of this angle.

Source

fn acos(self) -> Numeric

Get the arccosine of this angle.

Source

fn atan(self) -> Numeric

Get the arctan of this angle.

Source

fn normalize(self) -> Numeric

Normalize this value (abs of 1)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> NumericAccess for T
where Numeric: From<Self>,