Skip to content

Commit

Permalink
Fix doc_markdown lints in bevy_transform (bevyengine#3483)
Browse files Browse the repository at this point in the history
bevyengine#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_transform` crate.
  • Loading branch information
mfdorst authored and mockersf committed Jan 1, 2022
1 parent f931b0c commit 8953c49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions crates/bevy_transform/src/components/global_transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ impl GlobalTransform {
self.rotation * Vec3::X
}

/// Equivalent to -local_x()
/// Equivalent to [`-local_x()`][GlobalTransform::local_x]
#[inline]
pub fn left(&self) -> Vec3 {
-self.local_x()
}

/// Equivalent to local_x()
/// Equivalent to [`local_x()`][GlobalTransform::local_x]
#[inline]
pub fn right(&self) -> Vec3 {
self.local_x()
Expand All @@ -157,13 +157,13 @@ impl GlobalTransform {
self.rotation * Vec3::Y
}

/// Equivalent to local_y()
/// Equivalent to [`local_y()`][GlobalTransform::local_y]
#[inline]
pub fn up(&self) -> Vec3 {
self.local_y()
}

/// Equivalent to -local_y()
/// Equivalent to [`-local_y()`][GlobalTransform::local_y]
#[inline]
pub fn down(&self) -> Vec3 {
-self.local_y()
Expand All @@ -175,13 +175,13 @@ impl GlobalTransform {
self.rotation * Vec3::Z
}

/// Equivalent to -local_z()
/// Equivalent to [`-local_z()`][[GlobalTransform::local_z]
#[inline]
pub fn forward(&self) -> Vec3 {
-self.local_z()
}

/// Equivalent to local_z()
/// Equivalent to [`local_z()`][GlobalTransform::local_z]
#[inline]
pub fn back(&self) -> Vec3 {
self.local_z()
Expand Down
12 changes: 6 additions & 6 deletions crates/bevy_transform/src/components/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ impl Transform {
self.rotation * Vec3::X
}

/// Equivalent to -local_x()
/// Equivalent to [`-local_x()`][Transform::local_x()]
#[inline]
pub fn left(&self) -> Vec3 {
-self.local_x()
}

/// Equivalent to local_x()
/// Equivalent to [`local_x()`][Transform::local_x()]
#[inline]
pub fn right(&self) -> Vec3 {
self.local_x()
Expand All @@ -169,13 +169,13 @@ impl Transform {
self.rotation * Vec3::Y
}

/// Equivalent to local_y()
/// Equivalent to [`local_y()`][Transform::local_y]
#[inline]
pub fn up(&self) -> Vec3 {
self.local_y()
}

/// Equivalent to -local_y()
/// Equivalent to [`-local_y()`][Transform::local_y]
#[inline]
pub fn down(&self) -> Vec3 {
-self.local_y()
Expand All @@ -187,13 +187,13 @@ impl Transform {
self.rotation * Vec3::Z
}

/// Equivalent to -local_z()
/// Equivalent to [`-local_z()`][Transform::local_z]
#[inline]
pub fn forward(&self) -> Vec3 {
-self.local_z()
}

/// Equivalent to local_z()
/// Equivalent to [`local_z()`][Transform::local_z]
#[inline]
pub fn back(&self) -> Vec3 {
self.local_z()
Expand Down

0 comments on commit 8953c49

Please sign in to comment.