diff --git a/libs/pyglet_rs/src/src/lib.rs b/libs/pyglet_rs/src/src/lib.rs index 9776d49..7ca4343 100644 --- a/libs/pyglet_rs/src/src/lib.rs +++ b/libs/pyglet_rs/src/src/lib.rs @@ -7,8 +7,8 @@ */ mod math; -mod sprite; mod pymath; +mod sprite; use pyo3::prelude::*; diff --git a/libs/pyglet_rs/src/src/math.rs b/libs/pyglet_rs/src/src/math.rs index a578a64..ae133b7 100644 --- a/libs/pyglet_rs/src/src/math.rs +++ b/libs/pyglet_rs/src/src/math.rs @@ -45,7 +45,7 @@ pub mod vector { type Output = Self; fn add(self, rhs: Self) -> Self::Output { - Self::new(self.x + other.x, self.y + other.y) + Self::new(self.x + rhs.x, self.y + rhs.y) } } @@ -53,7 +53,7 @@ pub mod vector { type Output = Self; fn sub(self, rhs: Self) -> Self::Output { - Self::new(self.x - other.x, self.y - other.y) + Self::new(self.x - rhs.x, self.y - rhs.y) } } @@ -61,7 +61,7 @@ pub mod vector { type Output = Self; fn mul(self, rhs: Self) -> Self::Output { - Self::new(self.x * other.x, self.y * other.y) + Self::new(self.x * rhs.x, self.y * rhs.y) } } @@ -69,7 +69,7 @@ pub mod vector { type Output = Self; fn div(self, rhs: Self) -> Self::Output { - Self::new(self.x / other.x, self.y / other.y) + Self::new(self.x / rhs.x, self.y / rhs.y) } } @@ -238,7 +238,12 @@ pub mod vector { type Output = Self; fn add(self, rhs: Self) -> Self::Output { - Self::new(self.x + rhs.x, self.y + rhs.y, self.z + rhs.z, self.w + rhs.w) + Self::new( + self.x + rhs.x, + self.y + rhs.y, + self.z + rhs.z, + self.w + rhs.w, + ) } } @@ -246,7 +251,12 @@ pub mod vector { type Output = Self; fn sub(self, rhs: Self) -> Self::Output { - Self::new(self.x - rhs.x, self.y - rhs.y, self.z - rhs.z, self.w - rhs.w) + Self::new( + self.x - rhs.x, + self.y - rhs.y, + self.z - rhs.z, + self.w - rhs.w, + ) } } @@ -254,7 +264,12 @@ pub mod vector { type Output = Self; fn mul(self, rhs: Self) -> Self::Output { - Self::new(self.x * rhs.x, self.y * rhs.y, self.z * rhs.z, self.w * rhs.w) + Self::new( + self.x * rhs.x, + self.y * rhs.y, + self.z * rhs.z, + self.w * rhs.w, + ) } } @@ -262,7 +277,12 @@ pub mod vector { type Output = Self; fn div(self, rhs: Self) -> Self::Output { - Self::new(self.x / rhs.x, self.y / rhs.y, self.z / rhs.z, self.w / rhs.w) + Self::new( + self.x / rhs.x, + self.y / rhs.y, + self.z / rhs.z, + self.w / rhs.w, + ) } } diff --git a/libs/pyglet_rs/src/src/pymath.rs b/libs/pyglet_rs/src/src/pymath.rs index 507f7f6..18108e4 100644 --- a/libs/pyglet_rs/src/src/pymath.rs +++ b/libs/pyglet_rs/src/src/pymath.rs @@ -6,7 +6,6 @@ * ------------------------------- */ - pub mod python_class { use pyo3::prelude::*;