Trait cgmath::AbsDiffEq[][src]

pub trait AbsDiffEq<Rhs = Self>: PartialEq<Rhs> where
    Rhs: ?Sized
{ type Epsilon; fn default_epsilon() -> Self::Epsilon;
fn abs_diff_eq(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool; fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool { ... } }
Expand description

Equality that is defined using the absolute difference of two numbers.

Associated Types

Used for specifying relative comparisons.

Required methods

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.

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.

Provided methods

The inverse of AbsDiffEq::abs_diff_eq.

Implementations on Foreign Types

Implementors

impl<T, R: Dim, C: Dim, S> AbsDiffEq<Matrix<T, R, C, S>> for Matrix<T, R, C, S> where
    T: Scalar + AbsDiffEq,
    S: RawStorage<T, R, C>,
    T::Epsilon: Clone

impl<T, R: Dim, C: Dim, S> AbsDiffEq<Unit<Matrix<T, R, C, S>>> for Unit<Matrix<T, R, C, S>> where
    T: Scalar + AbsDiffEq,
    S: RawStorage<T, R, C>,
    T::Epsilon: Clone

impl<T: Scalar + AbsDiffEq, D: DimName> AbsDiffEq<OPoint<T, D>> for OPoint<T, D> where
    T::Epsilon: Clone,
    DefaultAllocator: Allocator<T, D>, 

impl<T, const D: usize> AbsDiffEq<Rotation<T, D>> for Rotation<T, D> where
    T: Scalar + AbsDiffEq,
    T::Epsilon: Clone

impl<T: RealField + AbsDiffEq<Epsilon = T>> AbsDiffEq<Quaternion<T>> for Quaternion<T>

impl<T: RealField + AbsDiffEq<Epsilon = T>> AbsDiffEq<Unit<Quaternion<T>>> for UnitQuaternion<T>

impl<T: RealField + AbsDiffEq<Epsilon = T>> AbsDiffEq<DualQuaternion<T>> for DualQuaternion<T>

impl<T: RealField + AbsDiffEq<Epsilon = T>> AbsDiffEq<Unit<DualQuaternion<T>>> for UnitDualQuaternion<T>

impl<T: Scalar + AbsDiffEq, const D: usize> AbsDiffEq<Translation<T, D>> for Translation<T, D> where
    T::Epsilon: Clone

impl<T: RealField, R, const D: usize> AbsDiffEq<Isometry<T, R, D>> for Isometry<T, R, D> where
    R: AbstractRotation<T, D> + AbsDiffEq<Epsilon = T::Epsilon>,
    T::Epsilon: Clone

impl<T: RealField, R, const D: usize> AbsDiffEq<Similarity<T, R, D>> for Similarity<T, R, D> where
    R: AbstractRotation<T, D> + AbsDiffEq<Epsilon = T::Epsilon>,
    T::Epsilon: Clone

impl<T: RealField, C: TCategory, const D: usize> AbsDiffEq<Transform<T, C, D>> for Transform<T, C, D> where
    Const<D>: DimNameAdd<U1>,
    T::Epsilon: Clone,
    DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>,