From d0583c8b5444660049a6a397604389f16323be97 Mon Sep 17 00:00:00 2001 From: Matty Date: Sun, 14 Jul 2024 13:00:41 -0400 Subject: [PATCH] Fix swapped docs for `Rot2::rotation_to/from_y` (#14307) # Objective Fixes #14301 ## Solution Swap them so that they are no longer swapped. --- crates/bevy_math/src/direction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs index df061195a7..386be0cf0c 100644 --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -229,7 +229,7 @@ impl Dir2 { self.rotation_from_x().inverse() } - /// Get the rotation that rotates this direction to the Y-axis. + /// Get the rotation that rotates the Y-axis to this direction. #[inline] pub fn rotation_from_y(self) -> Rot2 { // `x <- y`, `y <- -x` correspond to rotating clockwise by pi/2; @@ -238,7 +238,7 @@ impl Dir2 { Rot2::from_sin_cos(-self.0.x, self.0.y) } - /// Get the rotation that rotates the Y-axis to this direction. + /// Get the rotation that rotates this direction to the Y-axis. #[inline] pub fn rotation_to_y(self) -> Rot2 { self.rotation_from_y().inverse()