[][src]Trait approx::AbsDiffEq

pub trait AbsDiffEq: PartialEq {
    type Epsilon;
    fn default_epsilon() -> Self::Epsilon;
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool; fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool { ... } }

Equality that is defined using the absolute difference of two numbers.

Associated Types

type Epsilon

Used for specifying relative comparisons.

Loading content...

Required methods

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together.

This is used when no epsilon value is supplied to the abs_diff_eq!, relative_eq!, or ulps_eq! macros.

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.

Loading content...

Provided methods

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool

The inverse of ApproxEq::abs_diff_eq.

Loading content...

Implementations on Foreign Types

impl AbsDiffEq for u8[src]

type Epsilon = u8

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for u16[src]

type Epsilon = u16

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for u32[src]

type Epsilon = u32

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for u64[src]

type Epsilon = u64

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for usize[src]

type Epsilon = usize

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for i8[src]

type Epsilon = i8

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for i16[src]

type Epsilon = i16

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for i32[src]

type Epsilon = i32

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for i64[src]

type Epsilon = i64

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for isize[src]

type Epsilon = isize

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for f32[src]

type Epsilon = f32

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl AbsDiffEq for f64[src]

type Epsilon = f64

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl<'a, T: AbsDiffEq + ?Sized> AbsDiffEq for &'a T[src]

type Epsilon = T::Epsilon

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl<'a, T: AbsDiffEq + ?Sized> AbsDiffEq for &'a mut T[src]

type Epsilon = T::Epsilon

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl<T: AbsDiffEq + Copy> AbsDiffEq for Cell<T>[src]

type Epsilon = T::Epsilon

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl<T: AbsDiffEq + ?Sized> AbsDiffEq for RefCell<T>[src]

type Epsilon = T::Epsilon

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

impl<T: AbsDiffEq> AbsDiffEq for [T] where
    T::Epsilon: Clone
[src]

type Epsilon = T::Epsilon

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

Loading content...

Implementors

Loading content...