Browse Source

fix: matrix4 implementing Eq

pull/43/head
Natasha England-Elbro 11 months ago
parent
commit
61f7dbe075
No known key found for this signature in database
GPG Key ID: 46F323AE9236FD6A
  1. 6
      citro3d/src/math/matrix.rs
  2. 6
      citro3d/src/math/ops.rs

6
citro3d/src/math/matrix.rs

@ -183,12 +183,6 @@ impl core::fmt::Debug for Matrix4 {
f.debug_tuple("Matrix4").field(&self.rows_wzyx()).finish() f.debug_tuple("Matrix4").field(&self.rows_wzyx()).finish()
} }
} }
impl PartialEq<Matrix4> for Matrix4 {
fn eq(&self, other: &Matrix4) -> bool {
self.rows_wzyx() == other.rows_wzyx()
}
}
impl Eq for Matrix4 {}
#[cfg(feature = "glam")] #[cfg(feature = "glam")]
impl From<glam::Mat4> for Matrix4 { impl From<glam::Mat4> for Matrix4 {

6
citro3d/src/math/ops.rs

@ -190,6 +190,12 @@ impl Mul<FVec3> for &Matrix4 {
} }
} }
impl PartialEq<Matrix4> for Matrix4 {
fn eq(&self, other: &Matrix4) -> bool {
self.rows_wzyx() == other.rows_wzyx()
}
}
// endregion // endregion
#[cfg(feature = "approx")] #[cfg(feature = "approx")]

Loading…
Cancel
Save