[−][src]Trait float_cmp::ApproxEq
ApproxEq is a trait for approximate equality comparisons.
Associated Types
type Margin: Copy + Default
The Margin 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 for self
and other
values to be approximately equal
within margin
.
Provided methods
fn approx_ne<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool
This method tests for self
and other
values to be not approximately
equal within margin
.