pub trait Scalar64 {
Show 13 methods
// Required methods
fn bound(self, min: Self, max: Self) -> Self;
fn between(self, a: f64, b: f64) -> bool;
fn precisely_zero(self) -> bool;
fn approximately_zero_or_more(self) -> bool;
fn approximately_one_or_less(self) -> bool;
fn approximately_zero(self) -> bool;
fn approximately_zero_inverse(self) -> bool;
fn approximately_zero_cubed(self) -> bool;
fn approximately_zero_half(self) -> bool;
fn approximately_zero_when_compared_to(self, other: Self) -> bool;
fn approximately_equal(self, other: Self) -> bool;
fn approximately_equal_half(self, other: Self) -> bool;
fn almost_dequal_ulps(self, other: Self) -> bool;
}
Required Methods§
fn bound(self, min: Self, max: Self) -> Self
fn between(self, a: f64, b: f64) -> bool
fn precisely_zero(self) -> bool
fn approximately_zero_or_more(self) -> bool
fn approximately_one_or_less(self) -> bool
fn approximately_zero(self) -> bool
fn approximately_zero_inverse(self) -> bool
fn approximately_zero_cubed(self) -> bool
fn approximately_zero_half(self) -> bool
fn approximately_zero_when_compared_to(self, other: Self) -> bool
fn approximately_equal(self, other: Self) -> bool
fn approximately_equal_half(self, other: Self) -> bool
fn almost_dequal_ulps(self, other: Self) -> bool
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 Scalar64 for f64
impl Scalar64 for f64
Source§fn between(self, a: f64, b: f64) -> bool
fn between(self, a: f64, b: f64) -> bool
Returns true if (a <= self <= b) || (a >= self >= b).