Trait rustracer::misc::IsClose

source ·
pub trait IsClose<Rhs = Self> {
    // Required method
    fn is_close(&self, other: Self) -> bool;
}
Expand description

Trait for equivalence between two objects, up to a certain error tolerance.

Primitive elements that compose those objects must implement IsClose trait to derive this trait.

Required Methods§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IsClose for f32

source§

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

Return true if absolute value between two f32 is less than EPSILON

Implementors§