Trait float_cmp::ApproxEq [−][src]
pub trait ApproxEq: Sized { type Margin: Copy; fn approx_eq<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool; fn approx_ne<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool { ... } }
ApproxEq is a trait for approximate equality comparisons. The associated type defines a margin within which two values are to be considered approximately equal.
Associated Types
Loading content...Required methods
fn approx_eq<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool
[src]
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
[src]
This method tests for self
and other
values to be not approximately
equal within margin
.
Implementations on Foreign Types
impl ApproxEq for f32
[src]
impl ApproxEq for f32
[src]impl ApproxEq for f64
[src]
impl ApproxEq for f64
[src]