Skip to content

Commit

Permalink
Alias world_to_viewport for easier migration (#5298)
Browse files Browse the repository at this point in the history
# Objective

When someone searches in rustdoc for `world_to_screen`, they now will
find `world_to_viewport`. The method was renamed in 0.8, it would be
nice to allow users to find the new name more easily.

---
  • Loading branch information
nicopap committed Jul 12, 2022
1 parent f9c1a8a commit df7736c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_render/src/camera/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ impl Camera {
///
/// To get the coordinates in Normalized Device Coordinates, you should use
/// [`world_to_ndc`](Self::world_to_ndc).
#[doc(alias = "world_to_screen")]
pub fn world_to_viewport(
&self,
camera_transform: &GlobalTransform,
Expand Down

0 comments on commit df7736c

Please sign in to comment.