Trait egui::NumExt[]

pub trait NumExt {
    fn at_least(self, lower_limit: Self) -> Self;
fn at_most(self, upper_limit: Self) -> Self; }

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)

Loading content...

Implementations on Foreign Types

impl NumExt for f32

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

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

impl NumExt for usize

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

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

impl NumExt for f64

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

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

Loading content...

Implementors

impl NumExt for Pos2

pub fn at_least(self, lower_limit: Pos2) -> Pos2

pub fn at_most(self, upper_limit: Pos2) -> Pos2

impl NumExt for Vec2

pub fn at_least(self, lower_limit: Vec2) -> Vec2

pub fn at_most(self, upper_limit: Vec2) -> Vec2

Loading content...