lol idk #1

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

View File

@ -708,7 +708,11 @@ macro_rules! impl_not_const_generic{
let wide_self=self.[<fix_ $_2n>]();
//descend down the bits and check if flipping each bit would push the square over the input value
for shift in (0..=max_shift).rev(){
let new_result=result|Self::from_bits(BInt::from_bits(bnum::BUint::power_of_two(shift)));
let new_result={
let mut bits=result.to_bits().to_bits();
bits.set_bit(shift,true);
Self::from_bits(BInt::from_bits(bits))
};
if new_result.[<wide_mul_ $n _ $n>](new_result)<=wide_self{
result=new_result;
}