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

Equality comparisons between two numbers using both the absolute difference and relative based comparisons.

Required methods

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.

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

Provided methods

The inverse of RelativeEq::relative_eq.

Implementations on Foreign Types

Implementors