Trait alga::cmp::ApproxEq
[−]
[src]
pub trait ApproxEq { type Eps: Sized; fn default_epsilon() -> Self::Eps; fn approx_eq_eps(&self, b: &Self, epsilon: &Self::Eps) -> bool; fn approx_eq(&self, b: &Self) -> bool { ... } }
A type with an approximate equivalence relation.
Associated Types
Required Methods
fn default_epsilon() -> Self::Eps
The default epsilon value to use in ApproxEq::approx_eq
.
fn approx_eq_eps(&self, b: &Self, epsilon: &Self::Eps) -> bool
Compare a
and b
for approximate equality using the specified
epsilon value.
Provided Methods
fn approx_eq(&self, b: &Self) -> bool
Compare a
and b
for approximate equality using the default
epsilon value returned by ApproxEq::default_epsilon
.