pub trait ExtReal: Clone {
// Required methods
fn ext_floor_divide(self, other: Self) -> Self;
fn ext_min(self, other: Self) -> Self;
fn ext_min_value() -> Self;
fn ext_max(self, other: Self) -> Self;
fn ext_max_value() -> Self;
}Expand description
Extension trait for real types (floats and integers included).
Required Methods§
Sourcefn ext_floor_divide(self, other: Self) -> Self
fn ext_floor_divide(self, other: Self) -> Self
Computes the floor division of two numbers.
Sourcefn ext_min(self, other: Self) -> Self
fn ext_min(self, other: Self) -> Self
Returns the minimum of two numbers.
§Note
For floats, this uses the min method which handles NaNs according to IEEE 754-2008 (the
std library of rust).
Sourcefn ext_min_value() -> Self
fn ext_min_value() -> Self
The minimum value that can be represented by this type.
Sourcefn ext_max(self, other: Self) -> Self
fn ext_max(self, other: Self) -> Self
Returns the maximum of two numbers.
§Note
For floats, this uses the min method which handles NaNs according to IEEE 754-2008 (the
std library of rust).
Sourcefn ext_max_value() -> Self
fn ext_max_value() -> Self
The maximum value that can be represented by this type.
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.