[][src]Trait cgmath::UlpsEq

pub trait UlpsEq: AbsDiffEq {
    fn default_max_ulps() -> u32;
fn ulps_eq(
        &self,
        other: &Self,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool; fn ulps_ne(
        &self,
        other: &Self,
        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: &Self, 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: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of ApproxEq::ulps_eq.

Loading content...

Implementations on Foreign Types

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

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

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

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

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

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

impl UlpsEq for f64
[src]

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

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

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

impl UlpsEq for f32
[src]

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

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

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

Loading content...

Implementors

impl<A: Angle> UlpsEq for Euler<A>
[src]

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

impl<S: VectorSpace, R, E: BaseFloat> UlpsEq for Decomposed<S, R> where
    S: UlpsEq<Epsilon = E>,
    S::Scalar: UlpsEq<Epsilon = E>,
    R: UlpsEq<Epsilon = E>, 
[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading content...