[−][src]Trait ezcgmath::approx::RelativeEq
Equality comparisons between two numbers using both the absolute difference and relative based comparisons.
Required methods
fn default_max_relative() -> Self::Epsilon
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
&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
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
Implementations on Foreign Types
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, B> RelativeEq<[B]> for [A] where
A: RelativeEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]
A: RelativeEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
fn default_max_relative() -> <A as AbsDiffEq<B>>::Epsilon
[src]
fn relative_eq(
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_relative: <A as AbsDiffEq<B>>::Epsilon
) -> bool
[src]
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_relative: <A as AbsDiffEq<B>>::Epsilon
) -> bool
impl<T> RelativeEq<Cell<T>> for Cell<T> where
T: RelativeEq<T> + Copy,
[src]
T: RelativeEq<T> + Copy,
fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
fn relative_eq(
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<T> RelativeEq<RefCell<T>> for RefCell<T> where
T: RelativeEq<T> + ?Sized,
[src]
T: RelativeEq<T> + ?Sized,
fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
fn relative_eq(
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
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<'a, T> RelativeEq<&'a mut T> for &'a mut T where
T: RelativeEq<T> + ?Sized,
[src]
T: RelativeEq<T> + ?Sized,
fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
fn relative_eq(
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<'a, T> RelativeEq<&'a T> for &'a T where
T: RelativeEq<T> + ?Sized,
[src]
T: RelativeEq<T> + ?Sized,
fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
fn relative_eq(
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
Implementors
impl RelativeEq<Matrix1x3> for Matrix1x3
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Matrix2x2> for Matrix2x2
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Matrix3x3> for Matrix3x3
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Matrix4x4> for Matrix4x4
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Quaternion> for Quaternion
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Degrees> for Degrees
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Radians> for Radians
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Vector2> for Vector2
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Vector3> for Vector3
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl RelativeEq<Vector4> for Vector4
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool