Trait roots::FloatType [] [src]

pub trait FloatType: Sized + Copy + PartialEq + PartialOrd + Neg<Output=Self> + Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> {
    fn zero() -> Self;
    fn one() -> Self;
    fn two() -> Self;
    fn three() -> Self;
    fn pi() -> Self;
    fn two_third_pi() -> Self;
    fn sqrt(self) -> Self;
    fn acos(self) -> Self;
    fn cos(self) -> Self;
    fn abs(self) -> Self;
    fn powf(self, n: Self) -> Self;

    fn one_third() -> Self { ... }
    fn four() -> Self { ... }
    fn five() -> Self { ... }
    fn nine() -> Self { ... }
    fn twenty_seven() -> 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 two() -> Self

fn three() -> Self

fn pi() -> Self

fn two_third_pi() -> Self

fn sqrt(self) -> Self

fn acos(self) -> Self

fn cos(self) -> Self

fn abs(self) -> Self

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

Provided Methods

fn one_third() -> Self

fn four() -> Self

fn five() -> Self

fn nine() -> Self

fn twenty_seven() -> Self

fn cbrt(self) -> Self

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

Implementors