KIND OF ARBITRARY ZOOM (hangs at len 5 for some reason)

This commit is contained in:
2025-03-30 14:26:33 -04:00
parent 88e25da973
commit 44b6887e00
26 changed files with 1493 additions and 686 deletions

View File

@@ -8,6 +8,9 @@ const FRAC_MASK: u32 = FRAC_BIT - 1;
impl From<f32> for FixedDec {
fn from(value: f32) -> Self {
if value.is_zero() {
return Self::zero();
}
let raw = value.to_bits() & INV_SIGN_MASK;
let mut exp = (raw >> 23) as i32 - 127;
let mut frac = raw & FRAC_MASK;