Skip to main content

Field

Trait Field 

Source
pub trait Field: Ring {
    const HALF: Self;
    const PI: Self;
    const SQRT_2: Self;
    const INFINITY: Self;

    // Required methods
    fn sqrt(self) -> Self;
    fn exp(self) -> Self;
    fn sin(self) -> Self;
    fn cos(self) -> Self;
    fn tan(self) -> Self;
    fn sin_cos(self) -> (Self, Self);
    fn ln(self) -> Self;
    fn asin(self) -> Self;
    fn acos(self) -> Self;
    fn atan(self) -> Self;
    fn atan2(y: Self, x: Self) -> Self;
}

Required Associated Constants§

Source

const HALF: Self

Source

const PI: Self

Source

const SQRT_2: Self

Source

const INFINITY: Self

Required Methods§

Source

fn sqrt(self) -> Self

Source

fn exp(self) -> Self

Source

fn sin(self) -> Self

Source

fn cos(self) -> Self

Source

fn tan(self) -> Self

Source

fn sin_cos(self) -> (Self, Self)

Source

fn ln(self) -> Self

Source

fn asin(self) -> Self

Source

fn acos(self) -> Self

Source

fn atan(self) -> Self

Source

fn atan2(y: Self, x: Self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Field for f32

Source§

const HALF: Self = 0.5

Source§

const PI: Self = std::f32::consts::PI

Source§

const SQRT_2: Self = std::f32::consts::SQRT_2

Source§

const INFINITY: Self = Self::INFINITY

Source§

fn sqrt(self) -> Self

Source§

fn exp(self) -> Self

Source§

fn sin(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn sin_cos(self) -> (Self, Self)

Source§

fn ln(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

fn atan2(y: Self, x: Self) -> Self

Source§

impl Field for f64

Source§

const HALF: Self = 0.5

Source§

const PI: Self = std::f64::consts::PI

Source§

const SQRT_2: Self = std::f64::consts::SQRT_2

Source§

const INFINITY: Self = Self::INFINITY

Source§

fn sqrt(self) -> Self

Source§

fn exp(self) -> Self

Source§

fn sin(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn sin_cos(self) -> (Self, Self)

Source§

fn ln(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

fn atan2(y: Self, x: Self) -> Self

Implementors§