diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index 5f72a47..ab18621 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -8,6 +8,12 @@ pub struct Fixed{ pub(crate)frac:PhantomData, } +impl Fixed{ + pub const ZERO:Self=Self{bits:BInt::::ZERO,frac:PhantomData}; + pub const ONE:Self=Self{bits:BInt::::ONE.shl(Frac::U32),frac:PhantomData}; + pub const NEG_ONE:Self=Self{bits:BInt::::NEG_ONE.shl(Frac::U32),frac:PhantomData}; +} + impl From for Fixed where BInt:From