diff --git a/agb/src/number.rs b/agb/src/number.rs index 99b2a6c9..8f354b5e 100644 --- a/agb/src/number.rs +++ b/agb/src/number.rs @@ -491,6 +491,14 @@ impl> Div for Vector2D { } } +impl> DivAssign for Vector2D { + fn div_assign(&mut self, rhs: U) { + let result = *self / rhs; + self.x = result.x; + self.y = result.y; + } +} + #[test_case] fn test_vector_multiplication_and_division(_gba: &mut super::Gba) { let a: Vector2D = (1, 2).into();