use crate::float::F32;
pub trait F32Ext: Sized {
fn abs(self) -> f32;
fn acos(self) -> f32;
fn asin(self) -> f32;
fn atan(self) -> f32;
fn atan_norm(self) -> f32;
fn atan2(self, other: f32) -> f32;
fn atan2_norm(self, other: f32) -> f32;
fn ceil(self) -> f32;
fn copysign(self, sign: f32) -> f32;
fn cos(self) -> f32;
fn div_euclid(self, other: f32) -> f32;
fn exp(self) -> f32;
fn floor(self) -> f32;
fn fract(self) -> f32;
fn hypot(self, other: f32) -> f32;
fn inv(self) -> f32;
fn invsqrt(self) -> f32;
fn ln(self) -> f32;
fn log(self, base: f32) -> f32;
fn log2(self) -> f32;
fn log10(self) -> f32;
fn mul_add(self, a: f32, b: f32) -> f32;
fn powf(self, n: f32) -> f32;
fn powi(self, n: i32) -> f32;
fn recip(self) -> f32;
fn rem_euclid(self, other: f32) -> f32;
fn round(self) -> f32;
fn signum(self) -> f32;
fn sin(self) -> f32;
fn sin_cos(self) -> (f32, f32);
fn sqrt(self) -> f32;
fn tan(self) -> f32;
fn trunc(self) -> f32;
}
impl F32Ext for f32 {
#[inline]
fn abs(self) -> f32 {
F32(self).abs().0
}
#[inline]
fn acos(self) -> f32 {
F32(self).acos().0
}
#[inline]
fn asin(self) -> f32 {
F32(self).asin().0
}
#[inline]
fn atan(self) -> f32 {
F32(self).atan().0
}
#[inline]
fn atan_norm(self) -> f32 {
F32(self).atan_norm().0
}
#[inline]
fn atan2(self, other: f32) -> f32 {
F32(self).atan2(F32(other)).0
}
#[inline]
fn atan2_norm(self, other: f32) -> f32 {
F32(self).atan2_norm(F32(other)).0
}
#[inline]
fn ceil(self) -> f32 {
F32(self).ceil().0
}
#[inline]
fn copysign(self, sign: f32) -> f32 {
F32(self).copysign(F32(sign)).0
}
#[inline]
fn cos(self) -> f32 {
F32(self).cos().0
}
#[inline]
fn div_euclid(self, other: f32) -> f32 {
F32(self).div_euclid(F32(other)).0
}
#[inline]
fn exp(self) -> f32 {
F32(self).exp().0
}
#[inline]
fn floor(self) -> f32 {
F32(self).floor().0
}
#[inline]
fn fract(self) -> f32 {
F32(self).fract().0
}
#[inline]
fn hypot(self, other: f32) -> f32 {
F32(self).hypot(other.into()).0
}
#[inline]
fn inv(self) -> f32 {
F32(self).inv().0
}
#[inline]
fn invsqrt(self) -> f32 {
F32(self).invsqrt().0
}
#[inline]
fn ln(self) -> f32 {
F32(self).ln().0
}
#[inline]
fn log(self, base: f32) -> f32 {
F32(self).log(F32(base)).0
}
#[inline]
fn log2(self) -> f32 {
F32(self).log2().0
}
#[inline]
fn log10(self) -> f32 {
F32(self).log10().0
}
#[inline]
fn mul_add(self, a: f32, b: f32) -> f32 {
F32(self).mul_add(F32(a), F32(b)).0
}
#[inline]
fn powf(self, n: f32) -> f32 {
F32(self).powf(F32(n)).0
}
#[inline]
fn powi(self, n: i32) -> f32 {
F32(self).powi(n).0
}
#[inline]
fn recip(self) -> f32 {
F32(self).recip().0
}
#[inline]
fn rem_euclid(self, other: f32) -> f32 {
F32(self).rem_euclid(F32(other)).0
}
#[inline]
fn round(self) -> f32 {
F32(self).round().0
}
#[inline]
fn signum(self) -> f32 {
F32(self).signum().0
}
#[inline]
fn sin(self) -> f32 {
F32(self).sin().0
}
#[inline]
fn sin_cos(self) -> (f32, f32) {
(F32(self).sin().0, F32(self).cos().0)
}
#[inline]
fn sqrt(self) -> f32 {
F32(self).sqrt().0
}
#[inline]
fn tan(self) -> f32 {
F32(self).tan().0
}
#[inline]
fn trunc(self) -> f32 {
F32(self).trunc().0
}
}