ExtReal

Trait ExtReal 

Source
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§

Source

fn ext_floor_divide(self, other: Self) -> Self

Computes the floor division of two numbers.

Source

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).

Source

fn ext_min_value() -> Self

The minimum value that can be represented by this type.

Source

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).

Source

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.

Implementations on Foreign Types§

Source§

impl ExtReal for f32

Source§

fn ext_floor_divide(self, other: f32) -> f32

Source§

fn ext_min(self, other: f32) -> f32

Source§

fn ext_min_value() -> f32

Source§

fn ext_max(self, other: f32) -> f32

Source§

fn ext_max_value() -> f32

Source§

impl ExtReal for f64

Source§

fn ext_floor_divide(self, other: f64) -> f64

Source§

fn ext_min(self, other: f64) -> f64

Source§

fn ext_min_value() -> f64

Source§

fn ext_max(self, other: f64) -> f64

Source§

fn ext_max_value() -> f64

Source§

impl ExtReal for i8

Source§

fn ext_floor_divide(self, other: i8) -> i8

Source§

fn ext_min(self, other: i8) -> i8

Source§

fn ext_min_value() -> i8

Source§

fn ext_max(self, other: i8) -> i8

Source§

fn ext_max_value() -> i8

Source§

impl ExtReal for i16

Source§

fn ext_floor_divide(self, other: i16) -> i16

Source§

fn ext_min(self, other: i16) -> i16

Source§

fn ext_min_value() -> i16

Source§

fn ext_max(self, other: i16) -> i16

Source§

fn ext_max_value() -> i16

Source§

impl ExtReal for i32

Source§

fn ext_floor_divide(self, other: i32) -> i32

Source§

fn ext_min(self, other: i32) -> i32

Source§

fn ext_min_value() -> i32

Source§

fn ext_max(self, other: i32) -> i32

Source§

fn ext_max_value() -> i32

Source§

impl ExtReal for i64

Source§

fn ext_floor_divide(self, other: i64) -> i64

Source§

fn ext_min(self, other: i64) -> i64

Source§

fn ext_min_value() -> i64

Source§

fn ext_max(self, other: i64) -> i64

Source§

fn ext_max_value() -> i64

Source§

impl ExtReal for i128

Source§

impl ExtReal for isize

Source§

impl ExtReal for u8

Source§

fn ext_floor_divide(self, other: u8) -> u8

Source§

fn ext_min(self, other: u8) -> u8

Source§

fn ext_min_value() -> u8

Source§

fn ext_max(self, other: u8) -> u8

Source§

fn ext_max_value() -> u8

Source§

impl ExtReal for u16

Source§

fn ext_floor_divide(self, other: u16) -> u16

Source§

fn ext_min(self, other: u16) -> u16

Source§

fn ext_min_value() -> u16

Source§

fn ext_max(self, other: u16) -> u16

Source§

fn ext_max_value() -> u16

Source§

impl ExtReal for u32

Source§

fn ext_floor_divide(self, other: u32) -> u32

Source§

fn ext_min(self, other: u32) -> u32

Source§

fn ext_min_value() -> u32

Source§

fn ext_max(self, other: u32) -> u32

Source§

fn ext_max_value() -> u32

Source§

impl ExtReal for u64

Source§

fn ext_floor_divide(self, other: u64) -> u64

Source§

fn ext_min(self, other: u64) -> u64

Source§

fn ext_min_value() -> u64

Source§

fn ext_max(self, other: u64) -> u64

Source§

fn ext_max_value() -> u64

Source§

impl ExtReal for u128

Source§

impl ExtReal for usize

Source§

impl ExtReal for bf16

Source§

impl ExtReal for f16

Source§

fn ext_floor_divide(self, other: f16) -> f16

Source§

fn ext_min(self, other: f16) -> f16

Source§

fn ext_min_value() -> f16

Source§

fn ext_max(self, other: f16) -> f16

Source§

fn ext_max_value() -> f16

Implementors§