Skip to content

Commit

Permalink
Fix swapped docs for Rot2::rotation_to/from_y (#14307)
Browse files Browse the repository at this point in the history
# Objective

Fixes #14301 

## Solution

Swap them so that they are no longer swapped.
  • Loading branch information
mweatherley authored Jul 14, 2024
1 parent b36b023 commit e13c72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_math/src/direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()
Expand Down

0 comments on commit e13c72d

Please sign in to comment.