strafe-client/deferred_division/src/ratio.rs
2024-08-27 14:25:39 -07:00

11 lines
242 B
Rust

#[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;
}