Skip to content

Commit

Permalink
BorderRadius comment fix (#18141)
Browse files Browse the repository at this point in the history
# Objective

The doc comment for `BorderRadius::resolve_single_corner` returns a
value in physical pixels but the doc comments implies it returns a
logical value.
  • Loading branch information
ickshonpe authored Mar 4, 2025
1 parent d0caea0 commit 8a87a51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/bevy_ui/src/ui_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2428,7 +2428,8 @@ impl BorderRadius {
self
}

/// Compute the logical border radius for a single corner from the given values
/// Resolve the border radius for a single corner from the given context values.
/// Returns the radius of the corner in physical pixels.
pub fn resolve_single_corner(
radius: Val,
node_size: Vec2,
Expand All @@ -2447,6 +2448,8 @@ impl BorderRadius {
.clamp(0., 0.5 * node_size.min_element())
}

/// Resolve the border radii for the corners from the given context values.
/// Returns the radii of the each corner in physical pixels.
pub fn resolve(
&self,
node_size: Vec2,
Expand Down

0 comments on commit 8a87a51

Please sign in to comment.