[−][src]Trait float_cmp::ApproxEq
A trait for approximate equality comparisons.
Associated Types
type Margin: Copy + Default
This type type defines a margin within which two values are to be
considered approximately equal. It must implement Default
so that
approx_eq()
can be called on unknown types.
Required methods
fn approx_eq<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool
This method tests that the self
and other
values are equal within margin
of each other.
Provided methods
fn approx_ne<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool
This method tests that the self
and other
values are not within margin
of each other.