bevy_trackball::prelude

Trait UlpsEq

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

Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.

Required Methods§

Source

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.

Source

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§

Source

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

The inverse of UlpsEq::ulps_eq.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl UlpsEq for f32

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq(&self, other: &f32, epsilon: f32, max_ulps: u32) -> bool

Source§

impl UlpsEq for f64

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq(&self, other: &f64, epsilon: f64, max_ulps: u32) -> bool

Source§

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

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &&'a T, epsilon: <T as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

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

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &&'a mut T, epsilon: <T as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

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

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &[B], epsilon: <A as AbsDiffEq<B>>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T> UlpsEq for DualQuaternion<T>
where T: RealField<Epsilon = T> + UlpsEq,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &DualQuaternion<T>, epsilon: <DualQuaternion<T> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T> UlpsEq for Quaternion<T>
where T: RealField<Epsilon = T> + UlpsEq,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Quaternion<T>, epsilon: <Quaternion<T> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T> UlpsEq for Cell<T>
where T: UlpsEq + Copy,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Cell<T>, epsilon: <T as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T> UlpsEq for RefCell<T>
where T: UlpsEq + ?Sized,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &RefCell<T>, epsilon: <T as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, C, const D: usize> UlpsEq for Transform<T, C, D>

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Transform<T, C, D>, epsilon: <Transform<T, C, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, D> UlpsEq for OPoint<T, D>

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &OPoint<T, D>, epsilon: <OPoint<T, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, R, C, S> UlpsEq for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + UlpsEq, S: RawStorage<T, R, C>, <T as AbsDiffEq>::Epsilon: Clone,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Matrix<T, R, C, S>, epsilon: <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, R, const D: usize> UlpsEq for Isometry<T, R, D>
where T: RealField, R: AbstractRotation<T, D> + UlpsEq<Epsilon = <T as AbsDiffEq>::Epsilon>, <T as AbsDiffEq>::Epsilon: Clone,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Isometry<T, R, D>, epsilon: <Isometry<T, R, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, R, const D: usize> UlpsEq for Similarity<T, R, D>
where T: RealField, R: AbstractRotation<T, D> + UlpsEq<Epsilon = <T as AbsDiffEq>::Epsilon>, <T as AbsDiffEq>::Epsilon: Clone,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Similarity<T, R, D>, epsilon: <Similarity<T, R, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, const D: usize> UlpsEq for Rotation<T, D>
where T: Scalar + UlpsEq, <T as AbsDiffEq>::Epsilon: Clone,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Rotation<T, D>, epsilon: <Rotation<T, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, const D: usize> UlpsEq for Scale<T, D>
where T: Scalar + UlpsEq, <T as AbsDiffEq>::Epsilon: Clone,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Scale<T, D>, epsilon: <Scale<T, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Source§

impl<T, const D: usize> UlpsEq for Translation<T, D>
where T: Scalar + UlpsEq, <T as AbsDiffEq>::Epsilon: Clone,

Source§

fn default_max_ulps() -> u32

Source§

fn ulps_eq( &self, other: &Translation<T, D>, epsilon: <Translation<T, D> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

Implementors§

Source§

impl<N> UlpsEq for Frame<N>
where N: Copy + RealField + UlpsEq, <N as AbsDiffEq>::Epsilon: Copy,

Source§

impl<N> UlpsEq for Plane<N>
where N: Copy + RealField + UlpsEq, <N as AbsDiffEq>::Epsilon: Copy,

Source§

impl<T> UlpsEq for Unit<DualQuaternion<T>>
where T: RealField<Epsilon = T> + UlpsEq,

Source§

impl<T> UlpsEq for Unit<Quaternion<T>>
where T: RealField<Epsilon = T> + UlpsEq,

Source§

impl<T> UlpsEq for Unit<Complex<T>>
where T: RealField,

Source§

impl<T, R, C, S> UlpsEq for Unit<Matrix<T, R, C, S>>
where R: Dim, C: Dim, T: Scalar + UlpsEq, S: RawStorage<T, R, C>, <T as AbsDiffEq>::Epsilon: Clone,