[][src]Trait roots::FloatType

pub trait FloatType: Sized + Copy + Debug + From<i16> + PartialEq + PartialOrd + Neg<Output = Self> + Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Div<Output = Self> {
    fn zero() -> Self;
fn one() -> Self;
fn one_third() -> Self;
fn pi() -> Self;
fn two_third_pi() -> Self;
fn sqrt(self) -> Self;
fn atan(self) -> Self;
fn acos(self) -> Self;
fn sin(self) -> Self;
fn cos(self) -> Self;
fn abs(self) -> Self;
fn powf(self, n: Self) -> Self; fn cbrt(self) -> Self { ... } }

Generic type that lists functions and constants needed in calculations. Default implementations for f32 and f64 are provided.

Required methods

fn zero() -> Self

fn one() -> Self

fn one_third() -> Self

fn pi() -> Self

fn two_third_pi() -> Self

fn sqrt(self) -> Self

fn atan(self) -> Self

fn acos(self) -> Self

fn sin(self) -> Self

fn cos(self) -> Self

fn abs(self) -> Self

fn powf(self, n: Self) -> Self

Loading content...

Provided methods

fn cbrt(self) -> Self

The cubic root function is pow(x, 1/3) accepting negative arguments

Loading content...

Implementations on Foreign Types

impl FloatType for f32[src]

impl FloatType for f64[src]

Loading content...

Implementors

Loading content...