use core::ops::Neg;
pub trait MulAdd<Rhs = Self> {
fn mul_add(self, a: Rhs, b: Rhs) -> Self;
}
pub trait MinMax {
fn minimum(self, other: Self) -> Self;
fn maximum(self, other: Self) -> Self;
}
pub trait Clamp {
fn clamp_value(self, min: Self, max: Self) -> Self;
}
pub trait Negate: Neg {
fn negate(self) -> Self::Output;
}
pub trait Abs {
fn abs(self) -> Self;
}
pub trait Sqrt {
fn sqrt(self) -> Self;
}
pub trait Trigonometry: Sized {
fn sin(self) -> Self;
fn cos(self) -> Self;
fn tan(self) -> Self;
fn asin(self) -> Self;
fn acos(self) -> Self;
fn atan(self) -> Self;
fn atan2(self, other: Self) -> Self;
fn sin_cos(self) -> (Self, Self);
}
pub trait Exponential {
fn exp(self) -> Self;
fn exp2(self) -> Self;
fn exp_m1(self) -> Self;
fn ln(self) -> Self;
fn ln_1p(self) -> Self;
fn log(self, base: Self) -> Self;
fn log2(self) -> Self;
fn log10(self) -> Self;
}
pub trait Power {
fn powf(self, exp: Self) -> Self;
fn powi(self, n: i32) -> Self;
}
pub trait Cbrt {
fn cbrt(self) -> Self;
}
pub trait Hyperbolic {
fn sinh(self) -> Self;
fn cosh(self) -> Self;
fn tanh(self) -> Self;
fn asinh(self) -> Self;
fn acosh(self) -> Self;
fn atanh(self) -> Self;
}
pub trait Hypot {
fn hypot(self, other: Self) -> Self;
}