Trait godot::builtin::math::ApproxEq

pub trait ApproxEq: PartialEq {
    // Required method
    fn approx_eq(&self, other: &Self) -> bool;
}
Expand description

Approximate equality-comparison of geometric types.

The implementation is specific to the type. It’s mostly used for gdext-internal tests, but you may use it for your own code. Note that we give no guarantees about precision, and implementation can change at any time.

We currently also do not guarantee that this gives the same results as Godot’s own is_equal_approx() function; although this may be the goal in the future.

Required Methods§

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl ApproxEq for f32

§

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

§

impl ApproxEq for f64

§

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

Implementors§