wide-mul is a crate feature

here goes another bottom-up rewrite
This commit is contained in:
Quaternions 2024-09-06 12:49:10 -07:00
parent 8ee6204a42
commit f22cd653df
2 changed files with 3 additions and 1 deletions
fixed_wide

@ -4,8 +4,9 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[features] [features]
default=["zeroes"] default=["zeroes","wide-mul"]
ratio=[] ratio=[]
wide-mul=[]
zeroes=["ratio","dep:arrayvec"] zeroes=["ratio","dep:arrayvec"]
[dependencies] [dependencies]

@ -1,6 +1,7 @@
use bnum::{BInt,cast::As}; use bnum::{BInt,cast::As};
#[derive(Clone,Copy,Debug,Hash)] #[derive(Clone,Copy,Debug,Hash)]
/// A Fixed point number for which multiply operations widen the bits in the output. (when the wide-mul feature is enabled)
/// N is the number of u64s to use /// N is the number of u64s to use
/// F is the number of fractional bits (always N*32 lol) /// F is the number of fractional bits (always N*32 lol)
pub struct Fixed<const N:usize,const F:usize>{ pub struct Fixed<const N:usize,const F:usize>{