diff --git a/lib/fixed_wide/src/fixed.rs b/lib/fixed_wide/src/fixed.rs index f627ee717..16f721dd6 100644 --- a/lib/fixed_wide/src/fixed.rs +++ b/lib/fixed_wide/src/fixed.rs @@ -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