[−][src]Trait approx::AbsDiffEq
Equality that is defined using the absolute difference of two numbers.
Associated Types
type Epsilon
Used for specifying relative comparisons.
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: &Rhs, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
Provided methods
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of ApproxEq::abs_diff_eq
.
Implementations on Foreign Types
impl AbsDiffEq<u8> for u8
[src]
type Epsilon = u8
fn default_epsilon() -> u8
[src]
fn abs_diff_eq(&self, other: &u8, epsilon: u8) -> bool
[src]
impl AbsDiffEq<u16> for u16
[src]
type Epsilon = u16
fn default_epsilon() -> u16
[src]
fn abs_diff_eq(&self, other: &u16, epsilon: u16) -> bool
[src]
impl AbsDiffEq<u32> for u32
[src]
type Epsilon = u32
fn default_epsilon() -> u32
[src]
fn abs_diff_eq(&self, other: &u32, epsilon: u32) -> bool
[src]
impl AbsDiffEq<u64> for u64
[src]
type Epsilon = u64
fn default_epsilon() -> u64
[src]
fn abs_diff_eq(&self, other: &u64, epsilon: u64) -> bool
[src]
impl AbsDiffEq<usize> for usize
[src]
type Epsilon = usize
fn default_epsilon() -> usize
[src]
fn abs_diff_eq(&self, other: &usize, epsilon: usize) -> bool
[src]
impl AbsDiffEq<i8> for i8
[src]
type Epsilon = i8
fn default_epsilon() -> i8
[src]
fn abs_diff_eq(&self, other: &i8, epsilon: i8) -> bool
[src]
impl AbsDiffEq<i16> for i16
[src]
type Epsilon = i16
fn default_epsilon() -> i16
[src]
fn abs_diff_eq(&self, other: &i16, epsilon: i16) -> bool
[src]
impl AbsDiffEq<i32> for i32
[src]
type Epsilon = i32
fn default_epsilon() -> i32
[src]
fn abs_diff_eq(&self, other: &i32, epsilon: i32) -> bool
[src]
impl AbsDiffEq<i64> for i64
[src]
type Epsilon = i64
fn default_epsilon() -> i64
[src]
fn abs_diff_eq(&self, other: &i64, epsilon: i64) -> bool
[src]
impl AbsDiffEq<isize> for isize
[src]
type Epsilon = isize
fn default_epsilon() -> isize
[src]
fn abs_diff_eq(&self, other: &isize, epsilon: isize) -> bool
[src]
impl AbsDiffEq<f32> for f32
[src]
type Epsilon = f32
fn default_epsilon() -> f32
[src]
fn abs_diff_eq(&self, other: &f32, epsilon: f32) -> bool
[src]
impl AbsDiffEq<f64> for f64
[src]
type Epsilon = f64
fn default_epsilon() -> f64
[src]
fn abs_diff_eq(&self, other: &f64, epsilon: f64) -> bool
[src]
impl<'a, T: AbsDiffEq + ?Sized> AbsDiffEq<&'a T> for &'a T
[src]
type Epsilon = T::Epsilon
fn default_epsilon() -> T::Epsilon
[src]
fn abs_diff_eq(&self, other: &&'a T, epsilon: T::Epsilon) -> bool
[src]
impl<'a, T: AbsDiffEq + ?Sized> AbsDiffEq<&'a mut T> for &'a mut T
[src]
type Epsilon = T::Epsilon
fn default_epsilon() -> T::Epsilon
[src]
fn abs_diff_eq(&self, other: &&'a mut T, epsilon: T::Epsilon) -> bool
[src]
impl<T: AbsDiffEq + Copy> AbsDiffEq<Cell<T>> for Cell<T>
[src]
type Epsilon = T::Epsilon
fn default_epsilon() -> T::Epsilon
[src]
fn abs_diff_eq(&self, other: &Cell<T>, epsilon: T::Epsilon) -> bool
[src]
impl<T: AbsDiffEq + ?Sized> AbsDiffEq<RefCell<T>> for RefCell<T>
[src]
type Epsilon = T::Epsilon
fn default_epsilon() -> T::Epsilon
[src]
fn abs_diff_eq(&self, other: &RefCell<T>, epsilon: T::Epsilon) -> bool
[src]
impl<A, B> AbsDiffEq<[B]> for [A] where
A: AbsDiffEq<B>,
A::Epsilon: Clone,
[src]
A: AbsDiffEq<B>,
A::Epsilon: Clone,