pub trait Scalar {
    // Required methods
    fn half(self) -> Self;
    fn ave(self, other: Self) -> Self;
    fn sqr(self) -> Self;
    fn invert(self) -> Self;
    fn bound(self, min: Self, max: Self) -> Self;
    fn is_nearly_equal(self, other: Self) -> bool;
    fn is_nearly_zero(self) -> bool;
    fn is_nearly_zero_within_tolerance(self, tolerance: Self) -> bool;
    fn almost_dequal_ulps(self, other: Self) -> bool;
}Expand description
Float number extension methods.
Mainly for internal use. Do not rely on it!
Required Methods§
fn half(self) -> Self
fn ave(self, other: Self) -> Self
fn sqr(self) -> Self
fn invert(self) -> Self
fn bound(self, min: Self, max: Self) -> Self
fn is_nearly_equal(self, other: Self) -> bool
fn is_nearly_zero(self) -> bool
fn is_nearly_zero_within_tolerance(self, tolerance: 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.