fixed_wide_vectors/deferred_division/src/ratio.rs

11 lines
242 B
Rust
Raw Normal View History

2024-08-27 20:28:53 +00:00
#[derive(Clone,Copy,Debug,Hash)]
pub struct Ratio<Num,Den>{
pub(crate)num:Num,
pub(crate)den:Den,
}
//this trait is like a constructor for Ratio
pub trait DeferredDiv<Rhs=Self>{
type Output;
fn deferred_div(self,rhs:Rhs)->Self::Output;
}