Trait palette::num::ClampAssign
source · pub trait ClampAssign {
// Required methods
fn clamp_assign(&mut self, min: Self, max: Self);
fn clamp_min_assign(&mut self, min: Self);
fn clamp_max_assign(&mut self, max: Self);
}
Expand description
Assigning trait for clamping a value.
Required Methods§
sourcefn clamp_assign(&mut self, min: Self, max: Self)
fn clamp_assign(&mut self, min: Self, max: Self)
Clamp self to be within the range [min, max]
.
sourcefn clamp_min_assign(&mut self, min: Self)
fn clamp_min_assign(&mut self, min: Self)
Clamp self to be within the range [min, ∞)
.
sourcefn clamp_max_assign(&mut self, max: Self)
fn clamp_max_assign(&mut self, max: Self)
Clamp self to be within the range (-∞, max]
.
Object Safety§
This trait is not object safe.