pub trait Scalar: Copy {
const ZERO: Self;
const NEARLY_ZERO: Self;
const ONE: Self;
const HALF: Self;
// Required methods
fn nearly_equal(
x: scalar,
y: scalar,
tolerance: impl Into<Option<scalar>>,
) -> bool;
fn nearly_zero(&self, tolerance: impl Into<Option<scalar>>) -> bool;
}
Required Associated Constants§
Required Methods§
fn nearly_equal( x: scalar, y: scalar, tolerance: impl Into<Option<scalar>>, ) -> bool
fn nearly_zero(&self, tolerance: impl Into<Option<scalar>>) -> 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.