Trait euclid::approxeq::ApproxEq

source ·
pub trait ApproxEq<Eps> {
    // Required methods
    fn approx_epsilon() -> Eps;
    fn approx_eq_eps(&self, other: &Self, approx_epsilon: &Eps) -> bool;

    // Provided method
    fn approx_eq(&self, other: &Self) -> bool { ... }
}
Expand description

Trait for testing approximate equality

Required Methods§

source

fn approx_epsilon() -> Eps

Default epsilon value

source

fn approx_eq_eps(&self, other: &Self, approx_epsilon: &Eps) -> bool

Returns true is this object is approximately equal to the other one, using a provided epsilon value.

Provided Methods§

source

fn approx_eq(&self, other: &Self) -> bool

Returns true is this object is approximately equal to the other one, using the approx_epsilon() epsilon value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ApproxEq<f32> for f32

source§

fn approx_epsilon() -> f32

source§

fn approx_eq_eps(&self, other: &f32, approx_epsilon: &f32) -> bool

source§

impl ApproxEq<f64> for f64

source§

fn approx_epsilon() -> f64

source§

fn approx_eq_eps(&self, other: &f64, approx_epsilon: &f64) -> bool

Implementors§

source§

impl<T, Src, Dst> ApproxEq<T> for Rotation3D<T, Src, Dst>
where T: Copy + Neg<Output = T> + ApproxEq<T>,

source§

impl<T: ApproxEq<T>> ApproxEq<T> for Angle<T>

source§

impl<T: ApproxEq<T>, Src, Dst> ApproxEq<T> for Transform2D<T, Src, Dst>

source§

impl<T: ApproxEq<T>, Src, Dst> ApproxEq<T> for Transform3D<T, Src, Dst>

source§

impl<T: ApproxEq<T>, U> ApproxEq<Point2D<T, U>> for Point2D<T, U>

source§

impl<T: ApproxEq<T>, U> ApproxEq<Point3D<T, U>> for Point3D<T, U>

source§

impl<T: ApproxEq<T>, U> ApproxEq<Vector2D<T, U>> for Vector2D<T, U>

source§

impl<T: ApproxEq<T>, U> ApproxEq<Vector3D<T, U>> for Vector3D<T, U>

source§

impl<U, T: ApproxEq<T>> ApproxEq<T> for Length<T, U>