lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
Showing only changes of commit 78f860c672 - Show all commits

View File

@ -21,15 +21,18 @@ impl<const CHUNKS:usize,Frac:Unsigned> Fixed<CHUNKS,Frac>{
pub const NEG_HALF:Self=Self::from_bits(BInt::<CHUNKS>::NEG_ONE.shl(Frac::U32-1));
}
impl<const CHUNKS:usize,Frac> Fixed<CHUNKS,Frac>{
#[inline]
pub const fn from_bits(bits:BInt::<CHUNKS>)->Self{
Self{
bits,
frac:std::marker::PhantomData,
}
}
#[inline]
pub const fn to_bits(self)->BInt<CHUNKS>{
self.bits
}
#[inline]
pub const fn raw(value:i64)->Self{
Self::from_bits(BInt::from_bits(bnum::BUint::from_digit(value as u64)))
}