Skip to main content

SsFloat

Trait SsFloat 

Source
pub trait SsFloat:
    Sized
    + Copy
    + PartialEq
    + PartialOrd
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + AddAssign
    + SubAssign
    + MulAssign
    + DivAssign {
    // Required methods
    fn from_f32(v: f32) -> Self;
    fn to_i32(self) -> i32;
    fn powf(self, n: Self) -> Self;
    fn sin(self) -> Self;
    fn cos(self) -> Self;
    fn pi() -> Self;
}
Expand description

A trait to abstract floating-point operations for generic interpolation.

Required Methods§

Source

fn from_f32(v: f32) -> Self

Source

fn to_i32(self) -> i32

Source

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

Source

fn sin(self) -> Self

Source

fn cos(self) -> Self

Source

fn pi() -> 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 SsFloat for f32

Source§

fn from_f32(v: f32) -> Self

Source§

fn to_i32(self) -> i32

Source§

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

Source§

fn sin(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn pi() -> Self

Source§

impl SsFloat for f64

Source§

fn from_f32(v: f32) -> Self

Source§

fn to_i32(self) -> i32

Source§

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

Source§

fn sin(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn pi() -> Self

Implementors§