pub trait MaybeMath<In, Out> {
// Required methods
fn maybe_min(self, rhs: In) -> Out;
fn maybe_max(self, rhs: In) -> Out;
fn maybe_clamp(self, min: In, max: In) -> Out;
fn maybe_add(self, rhs: In) -> Out;
fn maybe_sub(self, rhs: In) -> Out;
}
Expand description
Required Methods§
sourcefn maybe_clamp(self, min: In, max: In) -> Out
fn maybe_clamp(self, min: In, max: In) -> Out
Returns self
clamped between min
and max