[−][src]Trait cgmath::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<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<'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
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<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<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 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 RelativeEq<f32> for f32
[src]
fn default_max_relative() -> f32
[src]
fn relative_eq(&self, other: &f32, epsilon: f32, max_relative: f32) -> bool
[src]
Implementors
impl<A: Angle> RelativeEq<Euler<A>> for Euler<A>
[src]
fn default_max_relative() -> A::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: A::Epsilon,
max_relative: A::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: A::Epsilon,
max_relative: A::Epsilon
) -> bool
impl<S: VectorSpace, R, E: BaseFloat> RelativeEq<Decomposed<S, R>> for Decomposed<S, R> where
S: RelativeEq<Epsilon = E>,
S::Scalar: RelativeEq<Epsilon = E>,
R: RelativeEq<Epsilon = E>,
[src]
S: RelativeEq<Epsilon = E>,
S::Scalar: RelativeEq<Epsilon = E>,
R: RelativeEq<Epsilon = E>,
fn default_max_relative() -> E
[src]
fn relative_eq(&self, other: &Self, epsilon: E, max_relative: E) -> bool
[src]
impl<S: BaseFloat> RelativeEq<Basis2<S>> for Basis2<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Basis3<S>> for Basis3<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Deg<S>> for Deg<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Matrix2<S>> for Matrix2<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Matrix3<S>> for Matrix3<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Matrix4<S>> for Matrix4<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Point1<S>> for Point1<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Point2<S>> for Point2<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Point3<S>> for Point3<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Quaternion<S>> for Quaternion<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Rad<S>> for Rad<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Vector1<S>> for Vector1<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Vector2<S>> for Vector2<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Vector3<S>> for Vector3<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
impl<S: BaseFloat> RelativeEq<Vector4<S>> for Vector4<S>
[src]
fn default_max_relative() -> S::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool