Trait rin::math::RelativeEq [−][src]
pub trait RelativeEq<Rhs = Self>: AbsDiffEq<Rhs> where
Rhs: ?Sized, { pub fn default_max_relative() -> Self::Epsilon; pub fn relative_eq(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool; pub fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool { ... } }
Equality comparisons between two numbers using both the absolute difference and relative based comparisons.
Required methods
pub 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.
pub 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
pub 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 RelativeEq::relative_eq
.
Implementations on Foreign Types
impl<T> RelativeEq<Cell<T>> for Cell<T> where
T: RelativeEq<T> + Copy,
[src]
impl<T> RelativeEq<Cell<T>> for Cell<T> where
T: RelativeEq<T> + Copy,
[src]impl<T> RelativeEq<RefCell<T>> for RefCell<T> where
T: RelativeEq<T> + ?Sized,
[src]
impl<T> RelativeEq<RefCell<T>> for RefCell<T> where
T: RelativeEq<T> + ?Sized,
[src]impl RelativeEq<f32> for f32
[src]
impl RelativeEq<f32> for f32
[src]pub fn default_max_relative() -> f32
[src]
pub fn relative_eq(&self, other: &f32, epsilon: f32, max_relative: f32) -> bool
[src]
impl<'a, T> RelativeEq<&'a T> for &'a T where
T: RelativeEq<T> + ?Sized,
[src]
impl<'a, T> RelativeEq<&'a T> for &'a T where
T: RelativeEq<T> + ?Sized,
[src]impl<A, B> RelativeEq<[B]> for [A] where
A: RelativeEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]
impl<A, B> RelativeEq<[B]> for [A] where
A: RelativeEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]impl<'a, T> RelativeEq<&'a mut T> for &'a mut T where
T: RelativeEq<T> + ?Sized,
[src]
impl<'a, T> RelativeEq<&'a mut T> for &'a mut T where
T: RelativeEq<T> + ?Sized,
[src]impl RelativeEq<f64> for f64
[src]
impl RelativeEq<f64> for f64
[src]pub fn default_max_relative() -> f64
[src]
pub fn relative_eq(&self, other: &f64, epsilon: f64, max_relative: f64) -> bool
[src]
Implementors
impl<N> RelativeEq<Quaternion<N>> for Quaternion<N> where
N: RealField<Epsilon = N> + RelativeEq<N>,
[src]
impl<N> RelativeEq<Quaternion<N>> for Quaternion<N> where
N: RealField<Epsilon = N> + RelativeEq<N>,
[src]pub fn default_max_relative(
) -> <Quaternion<N> as AbsDiffEq<Quaternion<N>>>::Epsilon
[src]
) -> <Quaternion<N> as AbsDiffEq<Quaternion<N>>>::Epsilon
pub fn relative_eq(
&self,
other: &Quaternion<N>,
epsilon: <Quaternion<N> as AbsDiffEq<Quaternion<N>>>::Epsilon,
max_relative: <Quaternion<N> as AbsDiffEq<Quaternion<N>>>::Epsilon
) -> bool
[src]
&self,
other: &Quaternion<N>,
epsilon: <Quaternion<N> as AbsDiffEq<Quaternion<N>>>::Epsilon,
max_relative: <Quaternion<N> as AbsDiffEq<Quaternion<N>>>::Epsilon
) -> bool
impl<N> RelativeEq<Unit<Complex<N>>> for Unit<Complex<N>> where
N: RealField,
[src]
impl<N> RelativeEq<Unit<Complex<N>>> for Unit<Complex<N>> where
N: RealField,
[src]pub fn default_max_relative(
) -> <Unit<Complex<N>> as AbsDiffEq<Unit<Complex<N>>>>::Epsilon
[src]
) -> <Unit<Complex<N>> as AbsDiffEq<Unit<Complex<N>>>>::Epsilon
pub fn relative_eq(
&self,
other: &Unit<Complex<N>>,
epsilon: <Unit<Complex<N>> as AbsDiffEq<Unit<Complex<N>>>>::Epsilon,
max_relative: <Unit<Complex<N>> as AbsDiffEq<Unit<Complex<N>>>>::Epsilon
) -> bool
[src]
&self,
other: &Unit<Complex<N>>,
epsilon: <Unit<Complex<N>> as AbsDiffEq<Unit<Complex<N>>>>::Epsilon,
max_relative: <Unit<Complex<N>> as AbsDiffEq<Unit<Complex<N>>>>::Epsilon
) -> bool
impl<N> RelativeEq<Unit<Quaternion<N>>> for Unit<Quaternion<N>> where
N: RealField<Epsilon = N> + RelativeEq<N>,
[src]
impl<N> RelativeEq<Unit<Quaternion<N>>> for Unit<Quaternion<N>> where
N: RealField<Epsilon = N> + RelativeEq<N>,
[src]pub fn default_max_relative(
) -> <Unit<Quaternion<N>> as AbsDiffEq<Unit<Quaternion<N>>>>::Epsilon
[src]
) -> <Unit<Quaternion<N>> as AbsDiffEq<Unit<Quaternion<N>>>>::Epsilon
pub fn relative_eq(
&self,
other: &Unit<Quaternion<N>>,
epsilon: <Unit<Quaternion<N>> as AbsDiffEq<Unit<Quaternion<N>>>>::Epsilon,
max_relative: <Unit<Quaternion<N>> as AbsDiffEq<Unit<Quaternion<N>>>>::Epsilon
) -> bool
[src]
&self,
other: &Unit<Quaternion<N>>,
epsilon: <Unit<Quaternion<N>> as AbsDiffEq<Unit<Quaternion<N>>>>::Epsilon,
max_relative: <Unit<Quaternion<N>> as AbsDiffEq<Unit<Quaternion<N>>>>::Epsilon
) -> bool
impl<N, D> RelativeEq<Point<N, D>> for Point<N, D> where
N: Scalar + RelativeEq<N>,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, D> RelativeEq<Point<N, D>> for Point<N, D> where
N: Scalar + RelativeEq<N>,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]impl<N, D> RelativeEq<Rotation<N, D>> for Rotation<N, D> where
N: Scalar + RelativeEq<N>,
D: DimName,
DefaultAllocator: Allocator<N, D, D>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, D> RelativeEq<Rotation<N, D>> for Rotation<N, D> where
N: Scalar + RelativeEq<N>,
D: DimName,
DefaultAllocator: Allocator<N, D, D>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]impl<N, D> RelativeEq<Translation<N, D>> for Translation<N, D> where
N: Scalar + RelativeEq<N>,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, D> RelativeEq<Translation<N, D>> for Translation<N, D> where
N: Scalar + RelativeEq<N>,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]pub fn default_max_relative(
) -> <Translation<N, D> as AbsDiffEq<Translation<N, D>>>::Epsilon
[src]
) -> <Translation<N, D> as AbsDiffEq<Translation<N, D>>>::Epsilon
pub fn relative_eq(
&self,
other: &Translation<N, D>,
epsilon: <Translation<N, D> as AbsDiffEq<Translation<N, D>>>::Epsilon,
max_relative: <Translation<N, D> as AbsDiffEq<Translation<N, D>>>::Epsilon
) -> bool
[src]
&self,
other: &Translation<N, D>,
epsilon: <Translation<N, D> as AbsDiffEq<Translation<N, D>>>::Epsilon,
max_relative: <Translation<N, D> as AbsDiffEq<Translation<N, D>>>::Epsilon
) -> bool
impl<N, D, C> RelativeEq<Transform<N, D, C>> for Transform<N, D, C> where
C: TCategory,
N: RealField,
D: DimNameAdd<U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
DefaultAllocator: Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>,
[src]
impl<N, D, C> RelativeEq<Transform<N, D, C>> for Transform<N, D, C> where
C: TCategory,
N: RealField,
D: DimNameAdd<U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
DefaultAllocator: Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>,
[src]pub fn default_max_relative(
) -> <Transform<N, D, C> as AbsDiffEq<Transform<N, D, C>>>::Epsilon
[src]
) -> <Transform<N, D, C> as AbsDiffEq<Transform<N, D, C>>>::Epsilon
pub fn relative_eq(
&self,
other: &Transform<N, D, C>,
epsilon: <Transform<N, D, C> as AbsDiffEq<Transform<N, D, C>>>::Epsilon,
max_relative: <Transform<N, D, C> as AbsDiffEq<Transform<N, D, C>>>::Epsilon
) -> bool
[src]
&self,
other: &Transform<N, D, C>,
epsilon: <Transform<N, D, C> as AbsDiffEq<Transform<N, D, C>>>::Epsilon,
max_relative: <Transform<N, D, C> as AbsDiffEq<Transform<N, D, C>>>::Epsilon
) -> bool
impl<N, D, R> RelativeEq<Isometry<N, D, R>> for Isometry<N, D, R> where
N: RealField,
D: DimName,
R: AbstractRotation<N, D> + RelativeEq<R, Epsilon = <N as AbsDiffEq<N>>::Epsilon>,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, D, R> RelativeEq<Isometry<N, D, R>> for Isometry<N, D, R> where
N: RealField,
D: DimName,
R: AbstractRotation<N, D> + RelativeEq<R, Epsilon = <N as AbsDiffEq<N>>::Epsilon>,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]pub fn default_max_relative(
) -> <Isometry<N, D, R> as AbsDiffEq<Isometry<N, D, R>>>::Epsilon
[src]
) -> <Isometry<N, D, R> as AbsDiffEq<Isometry<N, D, R>>>::Epsilon
pub fn relative_eq(
&self,
other: &Isometry<N, D, R>,
epsilon: <Isometry<N, D, R> as AbsDiffEq<Isometry<N, D, R>>>::Epsilon,
max_relative: <Isometry<N, D, R> as AbsDiffEq<Isometry<N, D, R>>>::Epsilon
) -> bool
[src]
&self,
other: &Isometry<N, D, R>,
epsilon: <Isometry<N, D, R> as AbsDiffEq<Isometry<N, D, R>>>::Epsilon,
max_relative: <Isometry<N, D, R> as AbsDiffEq<Isometry<N, D, R>>>::Epsilon
) -> bool
impl<N, D, R> RelativeEq<Similarity<N, D, R>> for Similarity<N, D, R> where
N: RealField,
D: DimName,
R: AbstractRotation<N, D> + RelativeEq<R, Epsilon = <N as AbsDiffEq<N>>::Epsilon>,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, D, R> RelativeEq<Similarity<N, D, R>> for Similarity<N, D, R> where
N: RealField,
D: DimName,
R: AbstractRotation<N, D> + RelativeEq<R, Epsilon = <N as AbsDiffEq<N>>::Epsilon>,
DefaultAllocator: Allocator<N, D, U1>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]pub fn default_max_relative(
) -> <Similarity<N, D, R> as AbsDiffEq<Similarity<N, D, R>>>::Epsilon
[src]
) -> <Similarity<N, D, R> as AbsDiffEq<Similarity<N, D, R>>>::Epsilon
pub fn relative_eq(
&self,
other: &Similarity<N, D, R>,
epsilon: <Similarity<N, D, R> as AbsDiffEq<Similarity<N, D, R>>>::Epsilon,
max_relative: <Similarity<N, D, R> as AbsDiffEq<Similarity<N, D, R>>>::Epsilon
) -> bool
[src]
&self,
other: &Similarity<N, D, R>,
epsilon: <Similarity<N, D, R> as AbsDiffEq<Similarity<N, D, R>>>::Epsilon,
max_relative: <Similarity<N, D, R> as AbsDiffEq<Similarity<N, D, R>>>::Epsilon
) -> bool
impl<N, R, C, S> RelativeEq<Matrix<N, R, C, S>> for Matrix<N, R, C, S> where
C: Dim,
N: Scalar + RelativeEq<N>,
R: Dim,
S: Storage<N, R, C>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, R, C, S> RelativeEq<Matrix<N, R, C, S>> for Matrix<N, R, C, S> where
C: Dim,
N: Scalar + RelativeEq<N>,
R: Dim,
S: Storage<N, R, C>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]pub fn default_max_relative(
) -> <Matrix<N, R, C, S> as AbsDiffEq<Matrix<N, R, C, S>>>::Epsilon
[src]
) -> <Matrix<N, R, C, S> as AbsDiffEq<Matrix<N, R, C, S>>>::Epsilon
pub fn relative_eq(
&self,
other: &Matrix<N, R, C, S>,
epsilon: <Matrix<N, R, C, S> as AbsDiffEq<Matrix<N, R, C, S>>>::Epsilon,
max_relative: <Matrix<N, R, C, S> as AbsDiffEq<Matrix<N, R, C, S>>>::Epsilon
) -> bool
[src]
&self,
other: &Matrix<N, R, C, S>,
epsilon: <Matrix<N, R, C, S> as AbsDiffEq<Matrix<N, R, C, S>>>::Epsilon,
max_relative: <Matrix<N, R, C, S> as AbsDiffEq<Matrix<N, R, C, S>>>::Epsilon
) -> bool
impl<N, R, C, S> RelativeEq<Unit<Matrix<N, R, C, S>>> for Unit<Matrix<N, R, C, S>> where
C: Dim,
N: Scalar + RelativeEq<N>,
R: Dim,
S: Storage<N, R, C>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]
impl<N, R, C, S> RelativeEq<Unit<Matrix<N, R, C, S>>> for Unit<Matrix<N, R, C, S>> where
C: Dim,
N: Scalar + RelativeEq<N>,
R: Dim,
S: Storage<N, R, C>,
<N as AbsDiffEq<N>>::Epsilon: Copy,
[src]pub fn default_max_relative(
) -> <Unit<Matrix<N, R, C, S>> as AbsDiffEq<Unit<Matrix<N, R, C, S>>>>::Epsilon
[src]
) -> <Unit<Matrix<N, R, C, S>> as AbsDiffEq<Unit<Matrix<N, R, C, S>>>>::Epsilon
pub fn relative_eq(
&self,
other: &Unit<Matrix<N, R, C, S>>,
epsilon: <Unit<Matrix<N, R, C, S>> as AbsDiffEq<Unit<Matrix<N, R, C, S>>>>::Epsilon,
max_relative: <Unit<Matrix<N, R, C, S>> as AbsDiffEq<Unit<Matrix<N, R, C, S>>>>::Epsilon
) -> bool
[src]
&self,
other: &Unit<Matrix<N, R, C, S>>,
epsilon: <Unit<Matrix<N, R, C, S>> as AbsDiffEq<Unit<Matrix<N, R, C, S>>>>::Epsilon,
max_relative: <Unit<Matrix<N, R, C, S>> as AbsDiffEq<Unit<Matrix<N, R, C, S>>>>::Epsilon
) -> bool