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§
fn maybe_min(self, rhs: In) -> Out
fn maybe_min(self, rhs: In) -> Out
Returns the minimum of self and rhs
fn maybe_max(self, rhs: In) -> Out
fn maybe_max(self, rhs: In) -> Out
Returns the maximum of self and rhs
fn maybe_clamp(self, min: In, max: In) -> Out
fn maybe_clamp(self, min: In, max: In) -> Out
Returns self clamped between min and max
fn maybe_add(self, rhs: In) -> Out
fn maybe_add(self, rhs: In) -> Out
Adds self and rhs.