Trait cgmath::UlpsEq[][src]

pub trait UlpsEq<Rhs = Self>: AbsDiffEq<Rhs> where
    Rhs: ?Sized
{ fn default_max_ulps() -> u32;
fn ulps_eq(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool; fn ulps_ne(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool { ... } }
Expand description

Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.

Required methods

The default ULPs to tolerate when testing values that are far-apart.

This is used when no max_ulps value is supplied to the ulps_eq macro.

A test for equality that uses units in the last place (ULP) if the values are far apart.

Provided methods

The inverse of UlpsEq::ulps_eq.

Implementations on Foreign Types

Implementors

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

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

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

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

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

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

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

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

impl<T: RealField> UlpsEq<Unit<Complex<T>>> for UnitComplex<T>

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

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

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

impl<T: RealField, C: TCategory, const D: usize> UlpsEq<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>>,