diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index 71b56e3..663be09 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -21,15 +21,18 @@ impl Fixed{ pub const NEG_HALF:Self=Self::from_bits(BInt::::NEG_ONE.shl(Frac::U32-1)); } impl Fixed{ + #[inline] pub const fn from_bits(bits:BInt::)->Self{ Self{ bits, frac:std::marker::PhantomData, } } + #[inline] pub const fn to_bits(self)->BInt{ self.bits } + #[inline] pub const fn raw(value:i64)->Self{ Self::from_bits(BInt::from_bits(bnum::BUint::from_digit(value as u64))) }