Skip to content

Commit

Permalink
Prefer as_vec2 instead of as_dvec2
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsgntz committed Jun 30, 2023
1 parent 2ee8af1 commit 5ad93c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_render/src/camera/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl Camera {
#[inline]
pub fn to_logical(&self, physical_size: UVec2) -> Option<Vec2> {
let scale = self.computed.target_info.as_ref()?.scale_factor;
Some((physical_size.as_dvec2() / scale as f64).as_vec2())
Some(physical_size.as_vec2() / scale)
}

/// The rendered physical bounds (minimum, maximum) of the camera. If the `viewport` field is
Expand Down

0 comments on commit 5ad93c9

Please sign in to comment.