Trait approx::RelativeEq [−][src]
Equality comparisons between two numbers using both the absolute difference and relative based comparisons.
Required methods
fn default_max_relative() -> Self::Epsilon
[src]
The default relative tolerance for testing values that are far-apart.
This is used when no max_relative
value is supplied to the relative_eq
macro.
fn relative_eq(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Provided methods
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
Implementations on Foreign Types
impl RelativeEq<f32> for f32
[src]
fn default_max_relative() -> f32
[src]
fn relative_eq(&self, other: &f32, epsilon: f32, max_relative: f32) -> bool
[src]
impl RelativeEq<f64> for f64
[src]
fn default_max_relative() -> f64
[src]
fn relative_eq(&self, other: &f64, epsilon: f64, max_relative: f64) -> bool
[src]
impl<'a, T: RelativeEq + ?Sized> RelativeEq<&'a T> for &'a T
[src]
fn default_max_relative() -> T::Epsilon
[src]
fn relative_eq(
&self,
other: &&'a T,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
[src]
&self,
other: &&'a T,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
impl<'a, T: RelativeEq + ?Sized> RelativeEq<&'a mut T> for &'a mut T
[src]
fn default_max_relative() -> T::Epsilon
[src]
fn relative_eq(
&self,
other: &&'a mut T,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
[src]
&self,
other: &&'a mut T,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
impl<T: RelativeEq + Copy> RelativeEq<Cell<T>> for Cell<T>
[src]
fn default_max_relative() -> T::Epsilon
[src]
fn relative_eq(
&self,
other: &Cell<T>,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
[src]
&self,
other: &Cell<T>,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
impl<T: RelativeEq + ?Sized> RelativeEq<RefCell<T>> for RefCell<T>
[src]
fn default_max_relative() -> T::Epsilon
[src]
fn relative_eq(
&self,
other: &RefCell<T>,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
[src]
&self,
other: &RefCell<T>,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
impl<A, B> RelativeEq<[B]> for [A] where
A: RelativeEq<B>,
A::Epsilon: Clone,
[src]
A: RelativeEq<B>,
A::Epsilon: Clone,
fn default_max_relative() -> A::Epsilon
[src]
fn relative_eq(
&self,
other: &[B],
epsilon: A::Epsilon,
max_relative: A::Epsilon
) -> bool
[src]
&self,
other: &[B],
epsilon: A::Epsilon,
max_relative: A::Epsilon
) -> bool