From 15939a3425c33ea6605cc9f07ee6da91edfda9ff Mon Sep 17 00:00:00 2001 From: Brandon S <116681127+bsibb22@users.noreply.github.com> Date: Mon, 17 Feb 2025 10:11:05 -0500 Subject: [PATCH] Fixed constness (actually) --- crates/bevy_ui/src/ui_node.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index be038e04c0..9fab8dcc7f 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -121,10 +121,8 @@ impl ComputedNode { /// The calculated node size as width and height in physical pixels, accounting for a non-uniform window scale factor. /// #[inline] - pub const fn logical_size(&self) -> Vec2 { - let s = self.size(); - let scale_fac = self.inverse_scale_factor(); - s * scale_fac + pub fn logical_size(&self) -> Vec2 { + self.size() * self.inverse_scale_factor() } /// Returns the thickness of the UI node's outline in physical pixels.