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]

A test for equality that uses a relative comparison if the values are far apart.

Loading content...

Provided methods

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

The inverse of RelativeEq::relative_eq.

Loading content...

Implementations on Foreign Types

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 RelativeEq<f32> for f32[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, T> RelativeEq<&'a mut T> for &'a mut T where
    T: RelativeEq<T> + ?Sized
[src]

impl RelativeEq<f64> for f64[src]

Loading content...

Implementors

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

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

impl<N> RelativeEq<Unit<Quaternion<N>>> for Unit<Quaternion<N>> where
    N: RealField<Epsilon = N> + RelativeEq<N>, 
[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<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, 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, 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<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, 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<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]

Loading content...