[][src]Trait cgmath::UlpsEq

pub trait UlpsEq<Rhs = Self>: AbsDiffEq<Rhs> where
    Rhs: ?Sized
{ fn default_max_ulps() -> u32;
fn ulps_eq(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool; fn ulps_ne(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool { ... } }

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.

Loading content...

Provided methods

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of ApproxEq::ulps_eq.

Loading content...

Implementations on Foreign Types

impl<T> UlpsEq<RefCell<T>> for RefCell<T> where
    T: UlpsEq<T> + ?Sized
[src]

impl UlpsEq<f64> for f64[src]

impl<'a, T> UlpsEq<&'a T> for &'a T where
    T: UlpsEq<T> + ?Sized
[src]

impl<T> UlpsEq<Cell<T>> for Cell<T> where
    T: UlpsEq<T> + Copy
[src]

impl<'a, T> UlpsEq<&'a mut T> for &'a mut T where
    T: UlpsEq<T> + ?Sized
[src]

impl UlpsEq<f32> for f32[src]

impl<A, B> UlpsEq<[B]> for [A] where
    A: UlpsEq<B>,
    <A as AbsDiffEq<B>>::Epsilon: Clone
[src]

Loading content...

Implementors

impl<A: Angle> UlpsEq<Euler<A>> for Euler<A>[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]

impl<S: BaseFloat> UlpsEq<Basis2<S>> for Basis2<S>[src]

impl<S: BaseFloat> UlpsEq<Basis3<S>> for Basis3<S>[src]

impl<S: BaseFloat> UlpsEq<Deg<S>> for Deg<S>[src]

impl<S: BaseFloat> UlpsEq<Matrix2<S>> for Matrix2<S>[src]

impl<S: BaseFloat> UlpsEq<Matrix3<S>> for Matrix3<S>[src]

impl<S: BaseFloat> UlpsEq<Matrix4<S>> for Matrix4<S>[src]

impl<S: BaseFloat> UlpsEq<Point1<S>> for Point1<S>[src]

impl<S: BaseFloat> UlpsEq<Point2<S>> for Point2<S>[src]

impl<S: BaseFloat> UlpsEq<Point3<S>> for Point3<S>[src]

impl<S: BaseFloat> UlpsEq<Quaternion<S>> for Quaternion<S>[src]

impl<S: BaseFloat> UlpsEq<Rad<S>> for Rad<S>[src]

impl<S: BaseFloat> UlpsEq<Vector1<S>> for Vector1<S>[src]

impl<S: BaseFloat> UlpsEq<Vector2<S>> for Vector2<S>[src]

impl<S: BaseFloat> UlpsEq<Vector3<S>> for Vector3<S>[src]

impl<S: BaseFloat> UlpsEq<Vector4<S>> for Vector4<S>[src]

Loading content...