fixed_wide: add midpoint

This commit is contained in:
Quaternions 2025-03-08 14:34:17 -08:00
parent 3798f438cf
commit 3d203e2da9

@ -64,6 +64,10 @@ impl<const N:usize,const F:usize> Fixed<N,F>{
pub const fn abs(self)->Self{
Self::from_bits(self.bits.abs())
}
#[inline]
pub const fn midpoint(self,other:Self)->Self{
Self::from_bits(self.bits.midpoint(other.bits))
}
}
impl<const F:usize> Fixed<1,F>{
/// My old code called this function everywhere so let's provide it