Trait approx::AbsDiffEq

source ·
pub trait AbsDiffEq: PartialEq {
    type Epsilon;

    fn default_epsilon() -> Self::Epsilon;
    fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool;

    fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool { ... }
}
Expand description

Equality that is defined using the absolute difference of two numbers.

Required Associated Types

Used for specifying relative comparisons.

Required Methods

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.

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

Provided Methods

The inverse of ApproxEq::abs_diff_eq.

Implementations on Foreign Types

Implementors