diff --git a/agb/src/number.rs b/agb/src/number.rs index 8f354b5e..a4f0238d 100644 --- a/agb/src/number.rs +++ b/agb/src/number.rs @@ -550,6 +550,10 @@ impl Vector2D> { self.x * self.x + self.y * self.y } + pub fn manhattan_distance(self) -> Num { + self.x.abs() + self.y.abs() + } + pub fn magnitude(self) -> Num { self.magnitude_squared().sqrt() }