pub trait NumberOps<T: Number> {
// Required methods
fn min(a: Self, b: Self) -> Self;
fn max(a: Self, b: Self) -> Self;
fn clamp(x: Self, min: Self, max: Self) -> Self;
fn step(a: Self, b: Self) -> Self;
}
Expand description
operations applicable to both floating point, integer and unsigned types