diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index b6956b2..23a8774 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -29,6 +29,9 @@ impl Fixed{ pub const fn to_bits(self)->BInt{ self.bits } + pub const fn raw(value:i64)->Self{ + Self::from_bits(BInt::from_bits(bnum::BUint::from_digit(value as u64))) + } } impl From for Fixed