[−][src]Trait cgmath::UlpsEq
Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.
Required methods
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart.
This is used when no max_ulps
value is supplied to the ulps_eq
macro.
fn ulps_eq(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
Provided methods
fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
Implementations on Foreign Types
impl<T> UlpsEq<RefCell<T>> for RefCell<T> where
T: UlpsEq<T> + ?Sized,
[src]
T: UlpsEq<T> + ?Sized,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl UlpsEq<f64> for f64
[src]
fn default_max_ulps() -> u32
[src]
fn ulps_eq(&self, other: &f64, epsilon: f64, max_ulps: u32) -> bool
[src]
impl<'a, T> UlpsEq<&'a T> for &'a T where
T: UlpsEq<T> + ?Sized,
[src]
T: UlpsEq<T> + ?Sized,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl<T> UlpsEq<Cell<T>> for Cell<T> where
T: UlpsEq<T> + Copy,
[src]
T: UlpsEq<T> + Copy,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl<'a, T> UlpsEq<&'a mut T> for &'a mut T where
T: UlpsEq<T> + ?Sized,
[src]
T: UlpsEq<T> + ?Sized,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl UlpsEq<f32> for f32
[src]
fn default_max_ulps() -> u32
[src]
fn ulps_eq(&self, other: &f32, epsilon: f32, max_ulps: u32) -> bool
[src]
impl<A, B> UlpsEq<[B]> for [A] where
A: UlpsEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]
A: UlpsEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_ulps: u32
) -> bool
Implementors
impl<A: Angle> UlpsEq<Euler<A>> for Euler<A>
[src]
fn default_max_ulps() -> u32
[src]
fn ulps_eq(&self, other: &Self, epsilon: A::Epsilon, max_ulps: u32) -> bool
[src]
impl<S: VectorSpace, R, E: BaseFloat> UlpsEq<Decomposed<S, R>> for Decomposed<S, R> where
S: UlpsEq<Epsilon = E>,
S::Scalar: UlpsEq<Epsilon = E>,
R: UlpsEq<Epsilon = E>,
[src]
S: UlpsEq<Epsilon = E>,
S::Scalar: UlpsEq<Epsilon = E>,
R: UlpsEq<Epsilon = E>,