Trait rin::math::AbsDiffEq[][src]

pub trait AbsDiffEq<Rhs = Self>: PartialEq<Rhs> where
    Rhs: ?Sized
{ type Epsilon; pub fn default_epsilon() -> Self::Epsilon;
pub fn abs_diff_eq(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool; pub 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[src]

Used for specifying relative comparisons.

Loading content...

Required methods

pub fn default_epsilon() -> Self::Epsilon[src]

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.

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

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

Loading content...

Provided methods

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

The inverse of AbsDiffEq::abs_diff_eq.

Loading content...

Implementations on Foreign Types

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

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

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

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

impl AbsDiffEq<i32> for i32[src]

type Epsilon = i32

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 AbsDiffEq<u32> for u32[src]

type Epsilon = u32

impl AbsDiffEq<isize> for isize[src]

type Epsilon = isize

impl AbsDiffEq<usize> for usize[src]

type Epsilon = usize

impl AbsDiffEq<f64> for f64[src]

type Epsilon = f64

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

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

impl AbsDiffEq<f32> for f32[src]

type Epsilon = f32

impl AbsDiffEq<i16> for i16[src]

type Epsilon = i16

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<u16> for u16[src]

type Epsilon = u16

impl AbsDiffEq<i8> for i8[src]

type Epsilon = i8

impl AbsDiffEq<i64> for i64[src]

type Epsilon = i64

impl AbsDiffEq<u64> for u64[src]

type Epsilon = u64

impl AbsDiffEq<u8> for u8[src]

type Epsilon = u8

Loading content...

Implementors

impl<N> AbsDiffEq<Quaternion<N>> for Quaternion<N> where
    N: RealField<Epsilon = N> + AbsDiffEq<N>, 
[src]

type Epsilon = N

impl<N> AbsDiffEq<Unit<Complex<N>>> for Unit<Complex<N>> where
    N: RealField
[src]

type Epsilon = N

impl<N> AbsDiffEq<Unit<Quaternion<N>>> for Unit<Quaternion<N>> where
    N: RealField<Epsilon = N> + AbsDiffEq<N>, 
[src]

type Epsilon = N

impl<N, D> AbsDiffEq<Point<N, D>> for Point<N, D> where
    N: Scalar + AbsDiffEq<N>,
    D: DimName,
    DefaultAllocator: Allocator<N, D, U1>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

impl<N, D> AbsDiffEq<Rotation<N, D>> for Rotation<N, D> where
    N: Scalar + AbsDiffEq<N>,
    D: DimName,
    DefaultAllocator: Allocator<N, D, D>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

impl<N, D> AbsDiffEq<Translation<N, D>> for Translation<N, D> where
    N: Scalar + AbsDiffEq<N>,
    D: DimName,
    DefaultAllocator: Allocator<N, D, U1>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

impl<N, D, C> AbsDiffEq<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]

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

impl<N, D, R> AbsDiffEq<Isometry<N, D, R>> for Isometry<N, D, R> where
    N: RealField,
    D: DimName,
    R: AbstractRotation<N, D> + AbsDiffEq<R, Epsilon = <N as AbsDiffEq<N>>::Epsilon>,
    DefaultAllocator: Allocator<N, D, U1>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

impl<N, D, R> AbsDiffEq<Similarity<N, D, R>> for Similarity<N, D, R> where
    N: RealField,
    D: DimName,
    R: AbstractRotation<N, D> + AbsDiffEq<R, Epsilon = <N as AbsDiffEq<N>>::Epsilon>,
    DefaultAllocator: Allocator<N, D, U1>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

impl<N, R, C, S> AbsDiffEq<Matrix<N, R, C, S>> for Matrix<N, R, C, S> where
    C: Dim,
    N: Scalar + AbsDiffEq<N>,
    R: Dim,
    S: Storage<N, R, C>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

impl<N, R, C, S> AbsDiffEq<Unit<Matrix<N, R, C, S>>> for Unit<Matrix<N, R, C, S>> where
    C: Dim,
    N: Scalar + AbsDiffEq<N>,
    R: Dim,
    S: Storage<N, R, C>,
    <N as AbsDiffEq<N>>::Epsilon: Copy
[src]

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

Loading content...