lol idk #1

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

View File

@ -68,6 +68,19 @@ macro_rules! impl_operator {
}
}
}
impl<const CHUNKS:usize,Frac:Unsigned,U> core::ops::$trait<U> for $struct<CHUNKS,Frac>
where
BInt::<CHUNKS>:From<U>,
{
type Output = $output;
fn $method(self, other: U) -> Self::Output {
Self {
bits:self.bits.$method(BInt::<CHUNKS>::from(other)<<Frac::U32),
frac:PhantomData,
}
}
}
};
}
macro_rules! impl_assign_operator {
@ -77,6 +90,14 @@ macro_rules! impl_assign_operator {
self.bits.$method(other.bits);
}
}
impl<const CHUNKS:usize,Frac:Unsigned,U> core::ops::$trait<U> for $struct<CHUNKS,Frac>
where
BInt::<CHUNKS>:From<U>,
{
fn $method(&mut self, other: U) {
self.bits.$method(BInt::<CHUNKS>::from(other)<<Frac::U32);
}
}
};
}