prevent 50 headaches
This commit is contained in:
parent
b656371142
commit
cd1aa26293
@ -29,6 +29,9 @@ impl<const CHUNKS:usize,Frac:Unsigned> Fixed<CHUNKS,Frac>{
|
|||||||
pub const fn to_bits(self)->BInt<CHUNKS>{
|
pub const fn to_bits(self)->BInt<CHUNKS>{
|
||||||
self.bits
|
self.bits
|
||||||
}
|
}
|
||||||
|
pub const fn raw(value:i64)->Self{
|
||||||
|
Self::from_bits(BInt::from_bits(bnum::BUint::from_digit(value as u64)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<const CHUNKS:usize,Frac:Unsigned,T> From<T> for Fixed<CHUNKS,Frac>
|
impl<const CHUNKS:usize,Frac:Unsigned,T> From<T> for Fixed<CHUNKS,Frac>
|
||||||
|
Loading…
Reference in New Issue
Block a user