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

View File

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

View File

@ -1,6 +1,7 @@
use bnum::{BInt,cast::As};
#[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
/// F is the number of fractional bits (always N*32 lol)
pub struct Fixed<const N:usize,const F:usize>{