diff --git a/agb-fixnum/src/lib.rs b/agb-fixnum/src/lib.rs index d9a546f2..2e5c4171 100644 --- a/agb-fixnum/src/lib.rs +++ b/agb-fixnum/src/lib.rs @@ -693,8 +693,8 @@ impl Vector2D> { /// ``` #[must_use] pub fn fast_magnitude(self) -> Num { - let max = core::cmp::max(self.x, self.y); - let min = core::cmp::min(self.x, self.y); + let max = core::cmp::max(self.x.abs(), self.y.abs()); + let min = core::cmp::min(self.x.abs(), self.y.abs()); max * num!(0.960433870103) + min * num!(0.397824734759) }