[][src]Trait mathru::algebra::abstr::RelativeEq

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 RelativeEq<f32> for f32[src]

impl RelativeEq<f64> for f64[src]

Loading content...

Implementors

impl RelativeEq<Matrix<f32>> for Matrix<f32>[src]

pub fn relative_eq(
    &self,
    other: &Matrix<f32>,
    epsilon: Self::Epsilon,
    max_relative: Self::Epsilon
) -> bool
[src]

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

impl RelativeEq<Matrix<f64>> for Matrix<f64>[src]

pub fn relative_eq(
    &self,
    other: &Matrix<f64>,
    epsilon: Self::Epsilon,
    max_relative: Self::Epsilon
) -> bool
[src]

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

impl RelativeEq<Vector<f32>> for Vector<f32>[src]

pub fn relative_eq(
    &self,
    other: &Vector<f32>,
    epsilon: Self::Epsilon,
    max_relative: Self::Epsilon
) -> bool
[src]

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

impl RelativeEq<Vector<f64>> for Vector<f64>[src]

pub fn relative_eq(
    &self,
    other: &Vector<f64>,
    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...