Inline the default implementation of approx_eq

This commit is contained in:
Sébastien Crozet 2014-01-09 20:53:01 +01:00
parent f5b0b76d8d
commit 1672e9e5d2
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@ pub trait ApproxEq<Eps> {
fn approx_eq_eps(a: &Self, other: &Self, epsilon: &Eps) -> bool;
/// Tests approximate equality.
#[inline]
fn approx_eq(a: &Self, b: &Self) -> bool {
ApproxEq::approx_eq_eps(a, b, &ApproxEq::approx_epsilon(None::<Self>))
}