lol idk #1

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

View File

@ -32,20 +32,6 @@ macro_rules! impl_matrix {
}
}
impl<const X:usize,const Y:usize,T:PartialEq> PartialEq for Matrix<X,Y,T>{
fn eq(&self,other:&Self)->bool{
self.array==other.array
}
}
impl<const X:usize,const Y:usize,T:Eq> Eq for Matrix<X,Y,T>{}
impl<const X:usize,const Y:usize,T:core::hash::Hash> core::hash::Hash for Matrix<X,Y,T>{
fn hash<H:core::hash::Hasher>(&self,state:&mut H){
self.array.hash(state);
}
}
impl<const X:usize,const Y:usize,T:Default> Default for Matrix<X,Y,T>{
fn default()->Self{
Self{

View File

@ -40,20 +40,6 @@ macro_rules! impl_vector {
}
}
impl<const N:usize,T:PartialEq> PartialEq for Vector<N,T>{
fn eq(&self,other:&Self)->bool{
self.array==other.array
}
}
impl<const N:usize,T:Eq> Eq for Vector<N,T>{}
impl<const N:usize,T:core::hash::Hash> core::hash::Hash for Vector<N,T>{
fn hash<H:core::hash::Hasher>(&self,state:&mut H){
self.array.hash(state);
}
}
impl<const N:usize,T:Default> Default for Vector<N,T>{
fn default()->Self{
Self{

View File

@ -1,4 +1,4 @@
#[derive(Clone,Copy)]
#[derive(Clone,Copy,Hash,Eq,PartialEq)]
pub struct Matrix<const X:usize,const Y:usize,T>{
pub(crate) array:[[T;Y];X],
}

View File

@ -1,4 +1,4 @@
#[derive(Clone,Copy)]
#[derive(Clone,Copy,Hash,Eq,PartialEq)]
pub struct Vector<const N:usize,T>{
pub(crate) array:[T;N],
}