lol idk #1

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

View File

@ -69,7 +69,8 @@ impl<const CHUNKS:usize,Frac:Unsigned> Fixed<CHUNKS,Frac>
//sqrt
//0110.0000
//pow2 = 0100.0000
let max_shift=((((CHUNKS as i32*64-Frac::I32-(self.bits.leading_zeros() as i32)+1)>>1)+Frac::I32) as u32).saturating_sub(1);
let used_bits=CHUNKS as i32*64-1-Frac::I32-self.bits.leading_zeros() as i32;
let max_shift=((used_bits>>1)+Frac::I32) as u32;
let mut result=Self::ZERO;
//cheat to make the types match