Compare commits

...

1 Commits

Author SHA1 Message Date
42c174df0c idk 2024-08-27 18:57:11 -07:00
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#[doc(hidden)]
#[macro_export(local_inner_macros)]
macro_rules! impl_length_operations {
( $struct: ident { $($field: ident), + }, $size: expr ) => {
impl<U,T:Copy+fixed_wide_traits::wide::WideMul<Output=U>> $struct<T> {
type Output=$struct<U>;
#[inline]
fn wide_with_length(self, rhs: Self) -> Self::Output {
let len=self.wide_length();
let ratio=rhs.ratio(len);
self.wide_mul(ratio)
}
}
}
}

View File

@ -1,5 +1,7 @@
#[cfg(feature="fixed_wide_traits")]
pub mod wide;
#[cfg(all(feature="fixed_wide_traits",feature="deferred_division"))]
pub mod length;
// Stolen from https://github.com/c1m50c/fixed-vectors (MIT license)
#[doc(hidden)]