[][src]Trait ezcgmath::approx::RelativeEq

pub trait RelativeEq<Rhs = Self>: AbsDiffEq<Rhs> where
    Rhs: ?Sized
{ fn default_max_relative() -> Self::Epsilon;
fn relative_eq(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_relative: Self::Epsilon
    ) -> bool; 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

fn default_max_relative() -> Self::Epsilon

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.

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

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

Loading content...

Provided methods

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

The inverse of ApproxEq::relative_eq.

Loading content...

Implementations on Foreign Types

impl RelativeEq<f64> for f64[src]

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

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

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

Loading content...

Implementors

impl RelativeEq<Matrix1x3> for Matrix1x3[src]

impl RelativeEq<Matrix2x2> for Matrix2x2[src]

impl RelativeEq<Matrix3x3> for Matrix3x3[src]

impl RelativeEq<Matrix4x4> for Matrix4x4[src]

impl RelativeEq<Quaternion> for Quaternion[src]

impl RelativeEq<Degrees> for Degrees[src]

impl RelativeEq<Radians> for Radians[src]

impl RelativeEq<Vector2> for Vector2[src]

impl RelativeEq<Vector3> for Vector3[src]

impl RelativeEq<Vector4> for Vector4[src]

Loading content...