lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
2 changed files with 16 additions and 0 deletions
Showing only changes of commit d38d103399 - Show all commits

View File

@ -27,6 +27,16 @@ impl<Int:PartialEq,Frac> PartialEq for Fixed<Int,Frac>{
}
impl<Int:Eq,Frac> Eq for Fixed<Int,Frac>{}
impl<Int:std::ops::Add<Output=Int>,Frac> std::ops::Add for Fixed<Int,Frac>{
type Output=Self;
fn add(self,rhs:Self)->Self::Output{
Self{
bits:self.bits+rhs.bits,
phantom:std::marker::PhantomData,
}
}
}
pub trait WideMul<Rhs=Self>{
type Output;
fn wide_mul(self,rhs:Rhs)->Self::Output;

View File

@ -19,6 +19,12 @@ fn wide_int64() {
assert_eq!(w3,Planar64Wide3::from((3i128*2).pow(4)));
}
#[test]
fn you_can_add_numbers(){
let a=Planar64Wide3::from((3i128*2).pow(4));
assert_eq!(a+a,Planar64Wide3::from((3i128*2).pow(4)*2))
}
#[test]
fn wide_vec3(){
let v=Vector3::from_value(Planar64::from(3));