Trait rerun::external::eframe::egui::epaint::emath::NumExt

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§

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

More readable version of self.max(lower_limit)

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§

§

impl NumExt for f32

§

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

§

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

§

impl NumExt for f64

§

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

§

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

§

impl NumExt for i8

§

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

§

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

§

impl NumExt for i16

§

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

§

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

§

impl NumExt for i32

§

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

§

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

§

impl NumExt for i64

§

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

§

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

§

impl NumExt for i128

§

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

§

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

§

impl NumExt for isize

§

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

§

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

§

impl NumExt for u8

§

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

§

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

§

impl NumExt for u16

§

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

§

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

§

impl NumExt for u32

§

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

§

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

§

impl NumExt for u64

§

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

§

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

§

impl NumExt for u128

§

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

§

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

§

impl NumExt for usize

§

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

§

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

Implementors§

§

impl NumExt for Pos2

§

impl NumExt for Vec2