Trait emath::NumExt

source ·
pub trait NumExt {
    // Required methods
    fn at_least(self, lower_limit: Self) -> Self;
    fn at_most(self, upper_limit: Self) -> Self;
}
Expand description

Extends f32, Vec2 etc with at_least and at_most as aliases for max and min.

Required Methods§

source

fn at_least(self, lower_limit: Self) -> Self

More readable version of self.max(lower_limit)

source

fn at_most(self, upper_limit: Self) -> Self

More readable version of self.min(upper_limit)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NumExt for f32

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for f64

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for i8

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for i16

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for i32

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for i64

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for i128

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for isize

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for u8

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for u16

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for u32

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for u64

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for u128

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

source§

impl NumExt for usize

source§

fn at_least(self, lower_limit: Self) -> Self

source§

fn at_most(self, upper_limit: Self) -> Self

Implementors§