ApproxEq

Trait ApproxEq 

Source
pub trait ApproxEq<Eps> {
    // Required methods
    fn approx_epsilon() -> Eps;
    fn approx_eq(&self, other: &Self) -> bool;
    fn approx_eq_eps(&self, other: &Self, approx_epsilon: &Eps) -> bool;
}
Expand description

Trait for testing approximate equality

Required Methods§

Source

fn approx_epsilon() -> Eps

Source

fn approx_eq(&self, other: &Self) -> bool

Source

fn approx_eq_eps(&self, other: &Self, approx_epsilon: &Eps) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ApproxEq<f32> for f32

Source§

fn approx_epsilon() -> f32

Source§

fn approx_eq(&self, other: &f32) -> bool

Source§

fn approx_eq_eps(&self, other: &f32, approx_epsilon: &f32) -> bool

Source§

impl ApproxEq<f64> for f64

Source§

fn approx_epsilon() -> f64

Source§

fn approx_eq(&self, other: &f64) -> bool

Source§

fn approx_eq_eps(&self, other: &f64, approx_epsilon: &f64) -> bool

Implementors§