[][src]Trait cgmath::AbsDiffEq

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 { ... } }

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

Associated Types

type Epsilon

Used for specifying relative comparisons.

Loading content...

Required methods

fn default_epsilon() -> Self::Epsilon

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.

fn abs_diff_eq(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

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

Loading content...

Provided methods

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of ApproxEq::abs_diff_eq.

Loading content...

Implementations on Foreign Types

impl AbsDiffEq<usize> for usize[src]

type Epsilon = usize

impl AbsDiffEq<i16> for i16[src]

type Epsilon = i16

impl AbsDiffEq<i32> for i32[src]

type Epsilon = i32

impl<T> AbsDiffEq<Cell<T>> for Cell<T> where
    T: AbsDiffEq<T> + Copy
[src]

type Epsilon = <T as AbsDiffEq<T>>::Epsilon

impl AbsDiffEq<f64> for f64[src]

type Epsilon = f64

impl AbsDiffEq<u64> for u64[src]

type Epsilon = u64

impl<T> AbsDiffEq<RefCell<T>> for RefCell<T> where
    T: AbsDiffEq<T> + ?Sized
[src]

type Epsilon = <T as AbsDiffEq<T>>::Epsilon

impl AbsDiffEq<f32> for f32[src]

type Epsilon = f32

impl AbsDiffEq<u32> for u32[src]

type Epsilon = u32

impl<'a, T> AbsDiffEq<&'a T> for &'a T where
    T: AbsDiffEq<T> + ?Sized
[src]

type Epsilon = <T as AbsDiffEq<T>>::Epsilon

impl AbsDiffEq<i64> for i64[src]

type Epsilon = i64

impl AbsDiffEq<u8> for u8[src]

type Epsilon = u8

impl<'a, T> AbsDiffEq<&'a mut T> for &'a mut T where
    T: AbsDiffEq<T> + ?Sized
[src]

type Epsilon = <T as AbsDiffEq<T>>::Epsilon

impl<A, B> AbsDiffEq<[B]> for [A] where
    A: AbsDiffEq<B>,
    <A as AbsDiffEq<B>>::Epsilon: Clone
[src]

type Epsilon = <A as AbsDiffEq<B>>::Epsilon

impl AbsDiffEq<i8> for i8[src]

type Epsilon = i8

impl AbsDiffEq<isize> for isize[src]

type Epsilon = isize

impl AbsDiffEq<u16> for u16[src]

type Epsilon = u16

Loading content...

Implementors

impl<A: Angle> AbsDiffEq<Euler<A>> for Euler<A>[src]

type Epsilon = A::Epsilon

impl<S: VectorSpace, R, E: BaseFloat> AbsDiffEq<Decomposed<S, R>> for Decomposed<S, R> where
    S: AbsDiffEq<Epsilon = E>,
    S::Scalar: AbsDiffEq<Epsilon = E>,
    R: AbsDiffEq<Epsilon = E>, 
[src]

type Epsilon = E

impl<S: BaseFloat> AbsDiffEq<Basis2<S>> for Basis2<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Basis3<S>> for Basis3<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Deg<S>> for Deg<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Matrix2<S>> for Matrix2<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Matrix3<S>> for Matrix3<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Matrix4<S>> for Matrix4<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Point1<S>> for Point1<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Point2<S>> for Point2<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Point3<S>> for Point3<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Quaternion<S>> for Quaternion<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Rad<S>> for Rad<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Vector1<S>> for Vector1<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Vector2<S>> for Vector2<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Vector3<S>> for Vector3<S>[src]

type Epsilon = S::Epsilon

impl<S: BaseFloat> AbsDiffEq<Vector4<S>> for Vector4<S>[src]

type Epsilon = S::Epsilon

Loading content...