Trait approx::RelativeEq

source ·
pub trait RelativeEq: AbsDiffEq {
    fn default_max_relative() -> Self::Epsilon;
    fn relative_eq(
        &self,
        other: &Self,
        epsilon: Self::Epsilon,
        max_relative: Self::Epsilon
    ) -> bool; fn relative_ne(
        &self,
        other: &Self,
        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 ApproxEq::relative_eq.

Implementations on Foreign Types

Implementors