Trait ApproxEq

Source
pub trait ApproxEq<Rhs = Self> {
    // Required method
    fn approx_eq(&self, other: &Rhs, tolerance: f64) -> bool;
}
Expand description

A trait for approximate equality.

Required Methods§

Source

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

Whether the value is within the tolerance of the other one.

Implementations on Foreign Types§

Source§

impl ApproxEq for f32

Source§

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

Source§

impl ApproxEq for f64

Source§

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

Source§

impl ApproxEq for i8

Source§

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

Source§

impl ApproxEq for i16

Source§

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

Source§

impl ApproxEq for i32

Source§

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

Source§

impl ApproxEq for i64

Source§

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

Source§

impl ApproxEq for i128

Source§

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

Source§

impl ApproxEq for isize

Source§

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

Source§

impl ApproxEq for u8

Source§

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

Source§

impl ApproxEq for u16

Source§

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

Source§

impl ApproxEq for u32

Source§

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

Source§

impl ApproxEq for u64

Source§

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

Source§

impl ApproxEq for u128

Source§

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

Source§

impl ApproxEq for usize

Source§

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

Implementors§