Skip to main content

FloatMath

Trait FloatMath 

Source
pub trait FloatMath: Sized {
    // Required methods
    fn abs(self) -> Self;
    fn sin(self) -> Self;
    fn cos(self) -> Self;
    fn sqrt(self) -> Self;
    fn ln(self) -> Self;
    fn exp(self) -> Self;
    fn atan2(self, x: Self) -> Self;
    fn powf(self, n: Self) -> Self;
    fn tanh(self) -> Self;
}
Expand description

Floating-point math trait providing sin, cos, sqrt, ln, exp, atan2, powf, tanh, abs.

Required Methods§

Source

fn abs(self) -> Self

Source

fn sin(self) -> Self

Source

fn cos(self) -> Self

Source

fn sqrt(self) -> Self

Source

fn ln(self) -> Self

Source

fn exp(self) -> Self

Source

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

Source

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

Source

fn tanh(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 FloatMath for f32

Source§

fn abs(self) -> f32

Source§

fn sin(self) -> f32

Source§

fn cos(self) -> f32

Source§

fn sqrt(self) -> f32

Source§

fn ln(self) -> f32

Source§

fn exp(self) -> f32

Source§

fn atan2(self, x: f32) -> f32

Source§

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

Source§

fn tanh(self) -> f32

Source§

impl FloatMath for f64

Source§

fn abs(self) -> f64

Source§

fn sin(self) -> f64

Source§

fn cos(self) -> f64

Source§

fn sqrt(self) -> f64

Source§

fn ln(self) -> f64

Source§

fn exp(self) -> f64

Source§

fn atan2(self, x: f64) -> f64

Source§

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

Source§

fn tanh(self) -> f64

Implementors§