From f22cd653df234f34bb6e32a0d1727da6e9ec409c Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 6 Sep 2024 12:49:10 -0700 Subject: [PATCH] wide-mul is a crate feature here goes another bottom-up rewrite --- fixed_wide/Cargo.toml | 3 ++- fixed_wide/src/fixed.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fixed_wide/Cargo.toml b/fixed_wide/Cargo.toml index cc218bc..ab20a56 100644 --- a/fixed_wide/Cargo.toml +++ b/fixed_wide/Cargo.toml @@ -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] diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index c8b1969..a5abc6d 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -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{