fixed_wide: add midpoint
This commit is contained in:
@ -64,6 +64,10 @@ impl<const N:usize,const F:usize> Fixed<N,F>{
|
|||||||
pub const fn abs(self)->Self{
|
pub const fn abs(self)->Self{
|
||||||
Self::from_bits(self.bits.abs())
|
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>{
|
impl<const F:usize> Fixed<1,F>{
|
||||||
/// My old code called this function everywhere so let's provide it
|
/// My old code called this function everywhere so let's provide it
|
||||||
|
Reference in New Issue
Block a user